; ; common_getdcwd from 0x18013becc to 0x18013c033 (359 bytes) ; ; 2 xrefs: ; > sub_18013C0B4 @ 0x18013c0d1 ; > @ 0x18020398c ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; push rbp ; +0x0, 0x18013becc push rbx ; +0x2, 0x18013bece push rsi ; +0x3, 0x18013becf push rdi ; +0x4, 0x18013bed0 push r14 ; +0x5, 0x18013bed1 mov rbp, rsp ; +0x7, 0x18013bed3 sub rsp, 60h ; +0xa, 0x18013bed6 mov rax, cs:__security_cookie ; +0xe, 0x18013beda xor rax, rsp ; +0x15, 0x18013bee1 mov [rbp+var_8], rax ; +0x18, 0x18013bee4 xor r14d, r14d ; +0x1c, 0x18013bee8 movsxd rsi, r8d ; +0x1f, 0x18013beeb mov rdi, rdx ; +0x22, 0x18013beee mov ebx, ecx ; +0x25, 0x18013bef1 test r8d, r8d ; +0x27, 0x18013bef3 jns short loc_18013BF21 ; +0x2a, 0x18013bef6 call _errno ; +0x2c, 0x18013bef8 mov dword ptr [rax], 16h ; +0x31, 0x18013befd call _invalid_parameter_noinfo ; +0x37, 0x18013bf03 xor eax, eax ; +0x3c, 0x18013bf08 mov rcx, [rbp+var_8] ; +0x3e, 0x18013bf0a xor rcx, rsp; StackCookie ; +0x42, 0x18013bf0e call __security_check_cookie ; +0x45, 0x18013bf11 add rsp, 60h ; +0x4a, 0x18013bf16 pop r14 ; +0x4e, 0x18013bf1a pop rdi ; +0x50, 0x18013bf1c pop rsi ; +0x51, 0x18013bf1d pop rbx ; +0x52, 0x18013bf1e pop rbp ; +0x53, 0x18013bf1f retn ; +0x54, 0x18013bf20 test ecx, ecx ; +0x55, 0x18013bf21 jz short loc_18013BF46 ; +0x57, 0x18013bf23 call _validdrive ; +0x59, 0x18013bf25 test eax, eax ; +0x5e, 0x18013bf2a jnz short loc_18013BF4D ; +0x60, 0x18013bf2c call __doserrno ; +0x62, 0x18013bf2e mov dword ptr [rax], 0Fh ; +0x67, 0x18013bf33 call _errno ; +0x6d, 0x18013bf39 mov dword ptr [rax], 0Dh ; +0x72, 0x18013bf3e jmp short loc_18013BF03 ; +0x78, 0x18013bf44 call _getdrive ; +0x7a, 0x18013bf46 mov ebx, eax ; +0x7f, 0x18013bf4b test ebx, ebx ; +0x81, 0x18013bf4d jz short loc_18013BF67 ; +0x83, 0x18013bf4f add bx, 40h ; '@' ; +0x85, 0x18013bf51 mov dword ptr [rbp+FileName+2], 2E003Ah ; +0x89, 0x18013bf55 mov [rbp+FileName], bx ; +0x90, 0x18013bf5c mov [rbp+var_A], r14w ; +0x94, 0x18013bf60 jmp short loc_18013BF6E ; +0x99, 0x18013bf65 mov dword ptr [rbp+FileName], 2Eh ; '.' ; +0x9b, 0x18013bf67 test rdi, rdi ; +0xa2, 0x18013bf6e jnz short loc_18013BFEF ; +0xa5, 0x18013bf71 lea rcx, [rsi+rsi]; Size ; +0xa7, 0x18013bf73 mov [rbp+var_40], r14 ; +0xab, 0x18013bf77 mov [rbp+var_38], r14 ; +0xaf, 0x18013bf7b mov [rbp+var_20], r14 ; +0xb3, 0x18013bf7f call j__malloc_base ; +0xb7, 0x18013bf83 mov [rbp+Block], rax ; +0xbc, 0x18013bf88 test rax, rax ; +0xc0, 0x18013bf8c jnz short loc_18013BF9B ; +0xc3, 0x18013bf8f mov [rbp+var_18], r14b ; +0xc5, 0x18013bf91 mov [rbp+var_28], r14 ; +0xc9, 0x18013bf95 jmp short loc_18013BFA3 ; +0xcd, 0x18013bf99 mov [rbp+var_18], 1 ; +0xcf, 0x18013bf9b mov [rbp+var_28], rsi ; +0xd3, 0x18013bf9f lea rdx, [rbp+var_40] ; +0xd7, 0x18013bfa3 lea rcx, [rbp+FileName]; lpFileName ; +0xdb, 0x18013bfa7 call ??$__acrt_get_full_path_name_wide@U__crt_win32_buffer_public_dynamic_resizing@@@@YAHQEB_WAEAV?$__crt_win32_buffer@_WU__crt_win32_buffer_public_dynamic_resizing@@@@@Z ; +0xdf, 0x18013bfab test eax, eax ; +0xe4, 0x18013bfb0 jnz short loc_18013BFD7 ; +0xe6, 0x18013bfb2 lea rcx, [rbp+var_40] ; +0xe8, 0x18013bfb4 call ?detach@?$__crt_win32_buffer@_WU__crt_win32_buffer_public_dynamic_resizing@@@@QEAAPEA_WXZ ; +0xec, 0x18013bfb8 mov rbx, rax ; +0xf1, 0x18013bfbd cmp [rbp+var_18], r14b ; +0xf4, 0x18013bfc0 jz short loc_18013BFCF ; +0xf8, 0x18013bfc4 mov rcx, [rbp+Block]; Block ; +0xfa, 0x18013bfc6 call free ; +0xfe, 0x18013bfca mov rax, rbx ; +0x103, 0x18013bfcf jmp loc_18013BF0A ; +0x106, 0x18013bfd2 cmp [rbp+var_18], r14b ; +0x10b, 0x18013bfd7 jz loc_18013BF08 ; +0x10f, 0x18013bfdb mov rcx, [rbp+Block]; Block ; +0x115, 0x18013bfe1 call free ; +0x119, 0x18013bfe5 jmp loc_18013BF08 ; +0x11e, 0x18013bfea test esi, esi ; +0x123, 0x18013bfef jle loc_18013BEF8 ; +0x125, 0x18013bff1 mov rcx, rsi ; +0x12b, 0x18013bff7 mov [rdi], r14w ; +0x12e, 0x18013bffa mov [rbp+var_38], rcx ; +0x132, 0x18013bffe lea rdx, [rbp+var_40] ; +0x136, 0x18013c002 mov [rbp+var_28], rcx ; +0x13a, 0x18013c006 lea rcx, [rbp+FileName] ; +0x13e, 0x18013c00a mov [rbp+var_40], rdi ; +0x142, 0x18013c00e mov [rbp+Block], rdi ; +0x146, 0x18013c012 mov [rbp+var_20], r14 ; +0x14a, 0x18013c016 mov [rbp+var_18], r14b ; +0x14e, 0x18013c01a call unknown_libname_66; Microsoft VisualC 64bit universal runtime ; +0x152, 0x18013c01e test eax, eax ; +0x157, 0x18013c023 jnz loc_18013BF08 ; +0x159, 0x18013c025 mov rax, rdi ; +0x15f, 0x18013c02b jmp loc_18013BF0A ; +0x162, 0x18013c02e