Function at 0x405334
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 0x405345
mov edx, dword [esi + 0x18]
lea ecx, [esp]
call fcn.0040bcd1
push dword [0x4122e8]
mov eax, dword [0x4151d8]
call fcn.004161d0
lea ecx, [esp + 8]
pop edx
call fcn.0040bc64
push dword [0x4122e8]
mov eax, dword [0x4151dc]
call fcn.004161d0
lea ecx, [esp + 0xc]
pop edx
call fcn.0040bc64
mov edx, dword [esp + 4]
xor ecx, ecx
call fcn.0040bd48
jne 0x405947
push dword [esp + 4]
mov edx, dword [0x4152f8]
pop ecx
call fcn.0040bd48
jne 0x405945
push dword [esp + 8]
call fcn.0040e2c0
push dword [esp]
call fcn.0040e2c0
fcompp
fnstsw ax
test ah, 0x41
je 0x405926
push 0x3e7
call fcn.00404df0
push dword [0x4122e8]
mov ebx, dword [esp + 0x14]
add ebx, 0x63
mov eax, ebx
call fcn.0040b3cb
push dword [0x4122e8]
mov ebx, dword [esp + 0x1c]
add ebx, 0x6f
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x20]
add ebx, 0x6d
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x18]
add ebx, 0x73
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x20]
add ebx, 0x70
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x24]
add ebx, 0x65
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x28]
add ebx, 0x63
mov eax, ebx
call fcn.0040b3cb
pop eax
lea ecx, [esp + 0x10]
pop edx
call fcn.0040bc64
push dword [0x4122e8]
mov eax, 0xff
call fcn.0040b75b
lea ecx, [esp + 0x28]
pop edx
call fcn.0040bc64
push 0xff
push dword [esp + 0x28]
push dword [esp + 0x14]
call sub.KERNEL32.DLL_GetEnvironmentVariableA
push dword [0x4122e8]
mov eax, 0xff
call fcn.0040b75b
lea ecx, [esp + 0x2c]
pop edx
call fcn.0040bc64
push dword [esp + 0x28]
push 0xff
call sub.KERNEL32.DLL_GetCurrentDirectoryA
push dword [0x4122e8]
push 1
mov eax, dword [esp + 0x30]
call fcn.0040b575
inc dword [0x4122e8]
mov edx, 0x412010
pop ecx
mov dword [0x4122e8], ecx
call fcn.0040bd48
jne 0x405520
mov edx, dword [esp + 0x28]
push dword [0x4122e8]
call fcn.0040bd10
mov edx, 0x412010
call fcn.0040bd10
lea ecx, [esp + 0x2c]
pop edx
call fcn.0040bc64
push dword [0x4122e8]
mov eax, 0xff
call fcn.0040b75b
lea ecx, [esp + 0x30]
pop edx
call fcn.0040bc64
push 0xff
push dword [esp + 0x30]
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push dword [0x4122e8]
push dword [esp + 0x30]
call fcn.0040e5d0
lea ecx, [esp + 0x34]
pop edx
call fcn.0040bc64
push dword [0x4122e8]
mov ebx, dword [esp + 0x3c]
add ebx, 0xd6
mov eax, ebx
call fcn.0040b3cb
push dword [0x4122e8]
mov ebx, dword [esp + 0x44]
add ebx, 0xe1
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x48]
add ebx, 0xd6
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x4c]
add ebx, 0xe0
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x50]
add ebx, 0xd8
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x54]
add ebx, 0xd7
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x58]
add ebx, 0xde
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x5c]
add ebx, 0xd8
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x60]
add ebx, 0xe0
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x58]
add ebx, 0xe1
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x50]
add ebx, 0x95
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x54]
add ebx, 0xa2
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x40]
add ebx, 0xd6
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x50]
add ebx, 0x93
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x64]
add ebx, 0xd7
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x48]
add ebx, 0xd8
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x60]
add ebx, 0xdf
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x64]
add ebx, 0x93
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x68]
add ebx, 0x95
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x5c]
add ebx, 0xe1
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x4c]
add ebx, 0xdd
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x58]
add ebx, 0xeb
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x48]
add ebx, 0xdb
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x54]
add ebx, 0xd4
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x48]
add ebx, 0xe2
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x44]
add ebx, 0xe0
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x64]
add ebx, 0xd4
mov eax, ebx
call fcn.0040b3cb
pop eax
push dword [0x4122e8]
mov ebx, dword [esp + 0x44]
add ebx, 0xd9
mov eax, ebx
call fcn.0040b3cb
pop eax
lea ecx, [esp + 0x38]
pop edx
call fcn.0040bc64
push dword [0x4122e8]
push 9
push 0xb
mov eax, dword [esp + 0x40]
call fcn.0040b51d
lea ecx, [esp + 0x68]
pop edx
call fcn.0040bc64
mov edx, 0x41224b
lea ecx, [esp + 0x34]
call fcn.0040bcb0
mov dword [esp + 0x68], 1
mov eax, dword [esp + 0x64]
call fcn.0040b507
cmp eax, dword [esp + 0x68]
jl 0x4058b4
push dword [0x4122e8]
push 1
push dword [esp + 0x70]
mov eax, dword [esp + 0x70]
call fcn.0040b51d
lea ecx, [esp + 0x70]
pop edx
call fcn.0040bc64
mov edx, dword [esp + 0x34]
push dword [0x4122e8]
call fcn.0040bd10
push dword [0x4122e8]
mov eax, dword [esp + 0x74]
call fcn.0040b3c0
mov ebx, eax
add ebx, 0xffffff8d
mov eax, ebx
call fcn.0040b3cb
pop eax
lea ecx, [esp + 0x38]
pop edx
call fcn.0040bc64
inc dword [esp + 0x68]
jmp 0x405848
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x64]
call fcn.0040bcb0
push dword [0x4122e8]
push 2
push 0x41224b
mov edx, dword [esp + 0x70]
push dword [0x4122e8]
call fcn.0040bd10
mov edx, 0x41224f
call fcn.0040bd10
mov edx, dword [esp + 0x38]
call fcn.0040bd10
mov edx, dword [esp + 0x40]
call fcn.0040bd10
mov edx, 0x41224f
call fcn.0040bd10
inc dword [0x4122e8]
push dword [esp + 0x34]
call fcn.0040e650
pop dword [0x4122e8]
mov dword [esp + 0x70], eax
jmp 0x40b37e
push dword [0x4152f8]
mov eax, dword [0x4151d8]
call fcn.00416200
push dword [esp]
mov eax, dword [0x4151dc]
call fcn.00416200
jmp 0x405945
jmp 0x405964
push dword [0x4152f8]
mov eax, dword [0x4151d8]
call fcn.00416200
push dword [esp]
mov eax, dword [0x4151dc]
call fcn.00416200
xor eax, eax
mov edx, dword [esp + 0x64]
call fcn.0040bd30
mov edx, dword [esp + 0xc]
call fcn.0040bd30
mov edx, dword [esp + 0x24]
call fcn.0040bd30
mov edx, dword [esp + 0x28]
call fcn.0040bd30
mov edx, dword [esp + 4]
call fcn.0040bd30
mov edx, dword [esp + 8]
call fcn.0040bd30
mov edx, dword [esp + 0x30]
call fcn.0040bd30
mov edx, dword [esp + 0x2c]
call fcn.0040bd30
mov edx, dword [esp + 0x6c]
call fcn.0040bd30
mov edx, dword [esp + 0x34]
call fcn.0040bd30
mov edx, dword [esp]
call fcn.0040bd30
add esp, 0x74
pop edi
pop esi
pop ebp
pop ecx
pop ebx
ret 4