Function at 0x40185c
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 [0x44a0d8]
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 0x4018e1
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.0042ae94
add esp, 4
cmp eax, 0x7ffffff0
jae 0x401d06
mov ebx, eax
cmp eax, 5
jae 0x401963
lea edi, [esp + 0x40]
mov byte [edi + 0xb], bl
test ebx, ebx
jne 0x401993
jmp 0x4019a2
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x401ba6
mov edi, eax
mov dword [esp + 0xc], ebx
dec eax
lea ebx, [esp + 0x34]
mov ecx, ebx
push 0
push eax
call fcn.00417ce2
cmp byte [ebx + 0xb], 0
jns 0x401910
mov ebx, dword [esp + 0x34]
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
jne 0x401aa4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0xed
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.004016d4
cmp byte [edi + 0x13], 0
jns 0x40195a
push dword [esp + 0x58]
call fcn.004192e8
add esp, 4
mov ebx, dword [esp + 0xc]
jmp 0x401be0
lea esi, [ebx + 8]
and esi, 0xfffffff8
js 0x401d0f
lea eax, [esi + esi]
push eax
call fcn.004192b8
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.0041d200
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.00418110
cmp eax, esi
je 0x4019e8
inc eax
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x20]
push edx
push eax
push 0
push edi
call fcn.00417b7a
cmp byte [esp + 0x3f], 0
js 0x401a4d
mov word [esp + 0x34], 0
mov byte [esp + 0x3f], 0
jmp 0x401a79
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x20]
mov dword [edi], 0xf7
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.004016d4
cmp byte [edi + 0x13], 0
mov ebx, dword [esp + 0xc]
jns 0x401a26
push dword [esp + 0x28]
call fcn.004192e8
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 0x401cdb
push dword [esp + 0x40]
call fcn.004192e8
add esp, 4
jmp 0x401cdb
mov eax, dword [esp + 0x34]
mov word [eax], 0
mov dword [esp + 0x38], 0
cmp byte [esp + 0x3f], 0
jns 0x401a79
push dword [esp + 0x34]
call fcn.004192e8
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 0x401aa4
push dword [esp + 0x40]
call fcn.004192e8
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.00401db0
add esp, 0xc
mov ecx, ebx
push edi
call fcn.00417c3c
cmp byte [edi + 0xb], 0
js 0x401ae8
mov word [esp + 0x50], 0
mov byte [esp + 0x5b], 0
jmp 0x401af9
mov eax, dword [esp + 0x50]
mov word [eax], 0
mov dword [esp + 0x54], 0
lea ecx, [esp + 0x50]
call fcn.00402132
movzx eax, byte [esp + 0x1f]
test al, al
jns 0x401b0f
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401c88
xor esi, esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
push 0x43c254
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esp + 0x20], eax
test eax, eax
je 0x401bf0
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
test eax, eax
je 0x401b8b
push 0x800
call eax
test eax, eax
je 0x401c2a
push str.version.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
mov eax, dword [esp + 0x40]
test eax, eax
je 0x401b7f
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [esp + 0x40], edi
test edi, edi
je 0x401c3c
cmp byte [esp + 0x1f], 0
jns 0x401b96
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [esp + 0x10], eax
jmp 0x401c76
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0xe8
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.004016d4
cmp byte [edi + 0x13], 0
jns 0x401be0
push dword [esp + 0x58]
call fcn.004192e8
add esp, 4
mov dword [ebx + 0xc], esi
mov dword [ebx + 8], esi
mov dword [ebx + 4], esi
mov dword [ebx], esi
jmp 0x401cdb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0x82
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.004016d4
cmp byte [edi + 0x13], 0
jns 0x401c7f
push dword [esp + 0x58]
call fcn.004192e8
add esp, 4
jmp 0x401c7f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0x91
jmp 0x401c4c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edi, [esp + 0x50]
mov dword [edi], 0x9c
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.004016d4
cmp byte [edi + 0x13], 0
jns 0x401c76
push dword [esp + 0x58]
call fcn.004192e8
add esp, 4
lea ecx, [esp + 0x40]
call fcn.004016a2
lea ecx, [esp + 0x20]
call fcn.004016a2
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0xc]
jne 0x401cc7
lea edi, [esp + 0x50]
mov dword [edi], 0x101
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.004016d4
cmp byte [edi + 0x13], 0
jns 0x401cc7
push dword [esp + 0x58]
call fcn.004192e8
add esp, 4
lea edi, [esp + 0x10]
mov ecx, ebx
mov edx, edi
call fcn.00401d68
mov ecx, edi
call fcn.004016a2
cmp byte [esp + 0x3f], 0
jns 0x401cee
push dword [esp + 0x34]
call fcn.004192e8
add esp, 4
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.00419315
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0x40]
call fcn.004175c8
call fcn.00429a0e