Function at 0x401859
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x260
mov ebx, ecx
mov eax, dword [0x46510c]
xor eax, ebp
mov dword [esp + 0x258], eax
xor edi, edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], edi
test edx, edx
je 0x4018de
mov dword [esp + 0xc], ebx
lea esi, [esp + 0x50]
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], edi
push esi
call fcn.004440a1
add esp, 4
cmp eax, 0x7ffffff0
jae 0x401d03
mov ebx, eax
cmp eax, 5
jae 0x401960
lea edi, [esp + 0x40]
mov byte [edi + 0xb], bl
test ebx, ebx
jne 0x401990
jmp 0x40199f
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x401ba3
mov edi, eax
mov dword [esp + 0xc], ebx
dec eax
lea ebx, [esp + 0x34]
mov ecx, ebx
push 0
push eax
call fcn.004181ae
cmp byte [ebx + 0xb], 0
jns 0x40190d
mov ebx, dword [esp + 0x34]
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
jne 0x401aa1
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0xef
mov dword [edi + 4], eax
xor esi, esi
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], esi
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004016b2
cmp byte [edi + 0x13], 0
jns 0x401957
push dword [esp + 0x58]
call fcn.0042fd04
add esp, 4
mov ebx, dword [esp + 0xc]
jmp 0x401bdd
lea esi, [ebx + 8]
and esi, 0xfffffff8
js 0x401d0c
lea eax, [esi + esi]
push eax
call fcn.0042fcd4
add esp, 4
mov edi, eax
mov dword [esp + 0x40], eax
or esi, 0x80000000
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
lea esi, [esp + 0x50]
mov eax, ebx
add eax, ebx
push eax
push esi
push edi
call fcn.00433350
add esp, 0xc
mov word [edi + ebx*2], 0
xor esi, esi
dec esi
lea edi, [esp + 0x40]
mov ecx, edi
push esi
push 0x5c
call fcn.004185dc
cmp eax, esi
je 0x4019e5
inc eax
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x20]
push edx
push eax
push 0
push edi
call fcn.00418046
cmp byte [esp + 0x3f], 0
js 0x401a4a
mov word [esp + 0x34], 0
mov byte [esp + 0x3f], 0
jmp 0x401a76
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x20]
mov dword [edi], 0xf9
mov dword [edi + 4], eax
xor esi, esi
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], esi
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004016b2
cmp byte [edi + 0x13], 0
mov ebx, dword [esp + 0xc]
jns 0x401a23
push dword [esp + 0x28]
call fcn.0042fd04
add esp, 4
mov dword [ebx + 0xc], esi
mov dword [ebx + 8], esi
mov dword [ebx + 4], esi
mov dword [ebx], esi
cmp byte [esp + 0x4b], 0
jns 0x401cd8
push dword [esp + 0x40]
call fcn.0042fd04
add esp, 4
jmp 0x401cd8
mov eax, dword [esp + 0x34]
mov word [eax], 0
mov dword [esp + 0x38], 0
cmp byte [esp + 0x3f], 0
jns 0x401a76
push dword [esp + 0x34]
call fcn.0042fd04
add esp, 4
mov dword [esp + 0x3c], 0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
cmp byte [esp + 0x4b], 0
jns 0x401aa1
push dword [esp + 0x40]
call fcn.0042fd04
add esp, 4
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
lea ebx, [esp + 0x14]
movaps xmmword [ebx - 4], xmm0
lea edi, [esp + 0x50]
lea edx, [esp + 0x34]
mov ecx, edi
push dword [ebp + 0x10]
push eax
push esi
call fcn.00401db6
add esp, 0xc
mov ecx, ebx
push edi
call fcn.00418108
cmp byte [edi + 0xb], 0
js 0x401ae5
mov word [esp + 0x50], 0
mov byte [esp + 0x5b], 0
jmp 0x401af6
mov eax, dword [esp + 0x50]
mov word [eax], 0
mov dword [esp + 0x54], 0
lea ecx, [esp + 0x50]
call fcn.00402138
movzx eax, byte [esp + 0x1f]
test al, al
jns 0x401b0c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401c85
xor esi, esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
push 0x455264
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esp + 0x20], eax
test eax, eax
je 0x401bed
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
test eax, eax
je 0x401b88
push 0x800
call eax
test eax, eax
je 0x401c27
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
mov eax, dword [esp + 0x40]
test eax, eax
je 0x401b7c
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [esp + 0x40], edi
test edi, edi
je 0x401c39
cmp byte [esp + 0x1f], 0
jns 0x401b93
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esp + 0x10], eax
jmp 0x401c73
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0xea
mov dword [edi + 4], eax
xor esi, esi
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], esi
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004016b2
cmp byte [edi + 0x13], 0
jns 0x401bdd
push dword [esp + 0x58]
call fcn.0042fd04
add esp, 4
mov dword [ebx + 0xc], esi
mov dword [ebx + 8], esi
mov dword [ebx + 4], esi
mov dword [ebx], esi
jmp 0x401cd8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0x84
mov dword [edi + 4], eax
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], esi
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004016b2
cmp byte [edi + 0x13], 0
jns 0x401c7c
push dword [esp + 0x58]
call fcn.0042fd04
add esp, 4
jmp 0x401c7c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0x93
jmp 0x401c49
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0x9e
mov dword [edi + 4], eax
xor eax, eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004016b2
cmp byte [edi + 0x13], 0
jns 0x401c73
push dword [esp + 0x58]
call fcn.0042fd04
add esp, 4
lea ecx, [esp + 0x40]
call fcn.00401680
lea ecx, [esp + 0x20]
call fcn.00401680
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0xc]
jne 0x401cc4
lea edi, [esp + 0x50]
mov dword [edi], 0x103
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.004016b2
cmp byte [edi + 0x13], 0
jns 0x401cc4
push dword [esp + 0x58]
call fcn.0042fd04
add esp, 4
lea edi, [esp + 0x10]
mov ecx, ebx
mov edx, edi
call fcn.00401d6a
mov ecx, edi
call fcn.00401680
cmp byte [esp + 0x3f], 0
jns 0x401ceb
push dword [esp + 0x34]
call fcn.0042fd04
add esp, 4
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.0042fd3a
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0x40]
call fcn.00417a30
call fcn.0043f854
int3