Function at 0x4093b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x411014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0xa
mov dword [ebp - 0x420], eax
mov esi, ecx
pop eax
push eax
mov edi, edx
push esi
mov dword [ebp - 0x434], edi
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
pop ecx
mov ebx, eax
pop ecx
mov ecx, esi
test ebx, ebx
jne 0x4093fc
call fcn.0040e267
mov dword [edi], eax
xor al, al
jmp 0x409792
push dword [ebp - 0x420]
xor eax, eax
or dl, 0xff
mov word [ebx], ax
call fcn.0040ec83
mov dword [edi], eax
push 0xa
pop eax
mov word [ebx], ax
add ebx, 2
mov eax, dword [edi]
cmp eax, esi
jne 0x409429
mov ecx, esi
call fcn.0040e267
mov dword [edi], eax
push dword [ebp - 0x420]
or dl, 0xff
mov dword [ebp - 0x42c], eax
mov ecx, ebx
call fcn.0040ec83
mov esi, eax
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x43c], esi
mov dword [ebp - 0x420], esi
call fcn.00408b25
test eax, eax
je 0x409784
xor ecx, ecx
mov dword [ebp - 0x438], ecx
mov byte [ebp - 0x419], cl
mov ecx, eax
call fcn.0040e267
mov esi, eax
xor eax, eax
mov dword [ebp - 0x428], esi
cmp word [esi], ax
jne 0x409626
push 0x401694
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x210]
push 0x103
push eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wgetenv_s]
add esp, 0x10
test eax, eax
jne 0x4094bb
cmp dword [ebp - 0x430], eax
jne 0x4094d5
push 0x40169c
lea eax, [ebp - 0x210]
push 0x103
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x418]
xor ecx, ecx
push eax
push ecx
push 0x4016a0
lea eax, [ebp - 0x210]
mov dword [ebp - 0x424], ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x409536
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x210]
push 0x103
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x20
push 0x4018b8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfsopen]
add esp, 0xc
mov dword [ebp - 0x424], eax
jmp 0x40953c
mov eax, dword [ebp - 0x424]
test eax, eax
jne 0x40955a
lea eax, [ebp - 0x210]
push eax
push 0x41e
push dword [0x4216a4]
call fcn.004053f6
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x20
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x4095f9
push 0x22
pop eax
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x4095f9
lea edi, [ebp - 0x210]
xor edx, edx
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, dx
jne 0x409595
sub edi, ecx
lea eax, [ebp - 0x210]
sar edi, 1
lea esi, [edi + edi]
push esi
push eax
lea eax, [ebp - 0x20e]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
lea edi, [edi*2 + 4]
push 0x22
pop eax
mov word [ebp - 0x210], ax
mov word [ebp + esi - 0x20e], ax
cmp edi, 0x206
jae 0x4097a3
mov esi, dword [ebp - 0x428]
xor eax, eax
mov word [ebp + edi - 0x210], ax
mov edi, dword [ebp - 0x434]
lea edx, [ebp - 0x210]
mov ecx, edi
call fcn.00408f3e
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
lea ecx, [ebp - 0x210]
call fcn.0040e267
mov esi, eax
mov dword [ebp - 0x428], esi
jmp 0x4096c1
mov edx, 0x4018b8
mov ecx, esi
call fcn.0040ffc6
mov dword [ebp - 0x424], eax
test eax, eax
jne 0x40964f
push esi
push 0x41e
push dword [0x4216a4]
call fcn.004053f6
jmp 0x4096be
mov esi, dword [sym.imp.VCRUNTIME140.dll_wcschr]
push 0x3c
pop eax
push eax
push dword [edi]
call esi
pop ecx
pop ecx
mov edx, eax
push 0x3c
pop ecx
lea eax, [edx + 2]
cmp word [eax], cx
je 0x409684
push ecx
pop edi
push edi
push eax
call esi
mov edx, eax
pop ecx
pop ecx
lea eax, [edx + 2]
cmp word [eax], di
jne 0x40966e
mov edi, dword [ebp - 0x434]
lea esi, [edx + 4]
mov ecx, esi
lea eax, [ecx + 2]
mov dword [ebp - 0x42c], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x438]
jne 0x409692
sub ecx, dword [ebp - 0x42c]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push edx
call sub.VCRUNTIME140.dll_memmove
mov esi, dword [ebp - 0x428]
add esp, 0xc
mov eax, dword [edi]
mov edx, esi
mov ecx, dword [ebp - 0x424]
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x419]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x420]
push eax
call fcn.0040918c
mov esi, dword [ebp - 0x420]
push 0xa
pop eax
push eax
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x409703
add eax, 2
jmp 0x40971e
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x438]
jne 0x409708
sub ecx, edx
sar ecx, 1
lea eax, [esi + ecx*2]
push dword [ebp - 0x424]
mov dword [ebp - 0x420], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp byte [ebp - 0x419], 0
pop ecx
jne 0x40975b
call fcn.0040e215
mov ecx, dword [ebp - 0x428]
mov esi, eax
call fcn.0040e267
mov edx, esi
mov dword [esi + 4], eax
mov ecx, 0x4323f4
call fcn.0040e36c
push dword [ebp - 0x428]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
lea ecx, [ebp - 0x42c]
call fcn.00408b25
test eax, eax
je 0x40977e
xor ecx, ecx
jmp 0x409468
mov esi, dword [ebp - 0x43c]
cmp esi, ebx
je 0x409790
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410365
leave
ret 8
call fcn.00410495
int3