Function at 0x4053d4
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebx
push ecx
push ebp
push esi
push edi
mov esi, esp
sub esp, 0x74
mov eax, esp
mov edx, eax
add edx, 0x74
mov dword [eax], 0
add eax, 4
cmp eax, edx
jne 0x4053e5
mov edx, dword [esi + 0x18]
lea ecx, [esp]
call fcn.0040bd81
push dword [0x412380]
mov eax, dword [0x415278]
call fcn.004171d0
lea ecx, [esp + 8]
pop edx
call fcn.0040bd14
push dword [0x412380]
mov eax, dword [0x41527c]
call fcn.004171d0
lea ecx, [esp + 0xc]
pop edx
call fcn.0040bd14
mov edx, dword [esp + 4]
xor ecx, ecx
call fcn.0040bdf8
jne 0x4059e7
push dword [esp + 4]
mov edx, dword [0x415398]
pop ecx
call fcn.0040bdf8
jne 0x4059e5
push dword [esp + 8]
call fcn.0040e370
push dword [esp]
call fcn.0040e370
fcompp
fnstsw ax
test ah, 0x41
je 0x4059c6
push 0x3e7
call fcn.00404e90
push dword [0x412380]
mov ebx, dword [esp + 0x14]
add ebx, 0x63
mov eax, ebx
call fcn.0040b47b
push dword [0x412380]
mov ebx, dword [esp + 0x1c]
add ebx, 0x6f
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x20]
add ebx, 0x6d
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x18]
add ebx, 0x73
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x20]
add ebx, 0x70
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x24]
add ebx, 0x65
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x28]
add ebx, 0x63
mov eax, ebx
call fcn.0040b47b
pop eax
lea ecx, [esp + 0x10]
pop edx
call fcn.0040bd14
push dword [0x412380]
mov eax, 0xff
call fcn.0040b80b
lea ecx, [esp + 0x28]
pop edx
call fcn.0040bd14
push 0xff
push dword [esp + 0x28]
push dword [esp + 0x14]
call sub.KERNEL32.DLL_GetEnvironmentVariableA
push dword [0x412380]
mov eax, 0xff
call fcn.0040b80b
lea ecx, [esp + 0x2c]
pop edx
call fcn.0040bd14
push dword [esp + 0x28]
push 0xff
call sub.KERNEL32.DLL_GetCurrentDirectoryA
push dword [0x412380]
push 1
mov eax, dword [esp + 0x30]
call fcn.0040b625
inc dword [0x412380]
mov edx, 0x412010
pop ecx
mov dword [0x412380], ecx
call fcn.0040bdf8
jne 0x4055c0
mov edx, dword [esp + 0x28]
push dword [0x412380]
call fcn.0040bdc0
mov edx, 0x412010
call fcn.0040bdc0
lea ecx, [esp + 0x2c]
pop edx
call fcn.0040bd14
push dword [0x412380]
mov eax, 0xff
call fcn.0040b80b
lea ecx, [esp + 0x30]
pop edx
call fcn.0040bd14
push 0xff
push dword [esp + 0x30]
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push dword [0x412380]
push dword [esp + 0x30]
call fcn.0040e680
lea ecx, [esp + 0x34]
pop edx
call fcn.0040bd14
push dword [0x412380]
mov ebx, dword [esp + 0x3c]
add ebx, 0xd6
mov eax, ebx
call fcn.0040b47b
push dword [0x412380]
mov ebx, dword [esp + 0x44]
add ebx, 0xe1
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x48]
add ebx, 0xd6
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x4c]
add ebx, 0xe0
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x50]
add ebx, 0xd8
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x54]
add ebx, 0xd7
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x58]
add ebx, 0xde
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x5c]
add ebx, 0xd8
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x60]
add ebx, 0xe0
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x58]
add ebx, 0xe1
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x50]
add ebx, 0x95
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x54]
add ebx, 0xa2
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x40]
add ebx, 0xd6
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x50]
add ebx, 0x93
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x64]
add ebx, 0xd7
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x48]
add ebx, 0xd8
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x60]
add ebx, 0xdf
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x64]
add ebx, 0x93
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x68]
add ebx, 0x95
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x5c]
add ebx, 0xe1
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x4c]
add ebx, 0xdd
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x58]
add ebx, 0xeb
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x48]
add ebx, 0xdb
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x54]
add ebx, 0xd4
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x48]
add ebx, 0xe2
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x44]
add ebx, 0xe0
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x64]
add ebx, 0xd4
mov eax, ebx
call fcn.0040b47b
pop eax
push dword [0x412380]
mov ebx, dword [esp + 0x44]
add ebx, 0xd9
mov eax, ebx
call fcn.0040b47b
pop eax
lea ecx, [esp + 0x38]
pop edx
call fcn.0040bd14
push dword [0x412380]
push 9
push 0xb
mov eax, dword [esp + 0x40]
call fcn.0040b5cd
lea ecx, [esp + 0x68]
pop edx
call fcn.0040bd14
mov edx, 0x4122e1
lea ecx, [esp + 0x34]
call fcn.0040bd60
mov dword [esp + 0x68], 1
mov eax, dword [esp + 0x64]
call fcn.0040b5b7
cmp eax, dword [esp + 0x68]
jl 0x405954
push dword [0x412380]
push 1
push dword [esp + 0x70]
mov eax, dword [esp + 0x70]
call fcn.0040b5cd
lea ecx, [esp + 0x70]
pop edx
call fcn.0040bd14
mov edx, dword [esp + 0x34]
push dword [0x412380]
call fcn.0040bdc0
push dword [0x412380]
mov eax, dword [esp + 0x74]
call fcn.0040b470
mov ebx, eax
add ebx, 0xffffff8d
mov eax, ebx
call fcn.0040b47b
pop eax
lea ecx, [esp + 0x38]
pop edx
call fcn.0040bd14
inc dword [esp + 0x68]
jmp 0x4058e8
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x64]
call fcn.0040bd60
push dword [0x412380]
push 2
push 0x4122e1
mov edx, dword [esp + 0x70]
push dword [0x412380]
call fcn.0040bdc0
mov edx, 0x4122e5
call fcn.0040bdc0
mov edx, dword [esp + 0x38]
call fcn.0040bdc0
mov edx, dword [esp + 0x40]
call fcn.0040bdc0
mov edx, 0x4122e5
call fcn.0040bdc0
inc dword [0x412380]
push dword [esp + 0x34]
call fcn.0040e700
pop dword [0x412380]
mov dword [esp + 0x70], eax
jmp 0x40b423
push dword [0x415398]
mov eax, dword [0x415278]
call fcn.00417200
push dword [esp]
mov eax, dword [0x41527c]
call fcn.00417200
jmp 0x4059e5
jmp 0x405a04
push dword [0x415398]
mov eax, dword [0x415278]
call fcn.00417200
push dword [esp]
mov eax, dword [0x41527c]
call fcn.00417200
xor eax, eax
mov edx, dword [esp + 0x64]
call fcn.0040bde0
mov edx, dword [esp + 0xc]
call fcn.0040bde0
mov edx, dword [esp + 0x24]
call fcn.0040bde0
mov edx, dword [esp + 0x28]
call fcn.0040bde0
mov edx, dword [esp + 4]
call fcn.0040bde0
mov edx, dword [esp + 8]
call fcn.0040bde0
mov edx, dword [esp + 0x30]
call fcn.0040bde0
mov edx, dword [esp + 0x2c]
call fcn.0040bde0
mov edx, dword [esp + 0x6c]
call fcn.0040bde0
mov edx, dword [esp + 0x34]
call fcn.0040bde0
mov edx, dword [esp]
call fcn.0040bde0
add esp, 0x74
pop edi
pop esi
pop ebp
pop ecx
pop ebx
ret 4