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.0040b7d1
push dword [0x4122fc]
mov eax, dword [0x4151e8]
call fcn.004161d0
lea ecx, [esp + 8]
pop edx
call fcn.0040b764
push dword [0x4122fc]
mov eax, dword [0x4151ec]
call fcn.004161d0
lea ecx, [esp + 0xc]
pop edx
call fcn.0040b764
mov edx, dword [esp + 4]
xor ecx, ecx
call fcn.0040b848
jne 0x405947
push dword [esp + 4]
mov edx, dword [0x4152fc]
pop ecx
call fcn.0040b848
jne 0x405945
push dword [esp + 8]
call fcn.0040ddc0
push dword [esp]
call fcn.0040ddc0
fcompp
fnstsw ax
test ah, 0x41
je 0x405926
push 0x3e7
call fcn.00404df0
push dword [0x4122fc]
mov ebx, dword [esp + 0x14]
add ebx, 0x63
mov eax, ebx
call fcn.0040aecb
push dword [0x4122fc]
mov ebx, dword [esp + 0x1c]
add ebx, 0x6f
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x20]
add ebx, 0x6d
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x18]
add ebx, 0x73
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x20]
add ebx, 0x70
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x24]
add ebx, 0x65
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x28]
add ebx, 0x63
mov eax, ebx
call fcn.0040aecb
pop eax
lea ecx, [esp + 0x10]
pop edx
call fcn.0040b764
push dword [0x4122fc]
mov eax, 0xff
call fcn.0040b25b
lea ecx, [esp + 0x28]
pop edx
call fcn.0040b764
push 0xff
push dword [esp + 0x28]
push dword [esp + 0x14]
call sub.KERNEL32.DLL_GetEnvironmentVariableA
push dword [0x4122fc]
mov eax, 0xff
call fcn.0040b25b
lea ecx, [esp + 0x2c]
pop edx
call fcn.0040b764
push dword [esp + 0x28]
push 0xff
call sub.KERNEL32.DLL_GetCurrentDirectoryA
push dword [0x4122fc]
push 1
mov eax, dword [esp + 0x30]
call fcn.0040b075
inc dword [0x4122fc]
mov edx, 0x412010
pop ecx
mov dword [0x4122fc], ecx
call fcn.0040b848
jne 0x405520
mov edx, dword [esp + 0x28]
push dword [0x4122fc]
call fcn.0040b810
mov edx, 0x412010
call fcn.0040b810
lea ecx, [esp + 0x2c]
pop edx
call fcn.0040b764
push dword [0x4122fc]
mov eax, 0xff
call fcn.0040b25b
lea ecx, [esp + 0x30]
pop edx
call fcn.0040b764
push 0xff
push dword [esp + 0x30]
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push dword [0x4122fc]
push dword [esp + 0x30]
call fcn.0040e0d0
lea ecx, [esp + 0x34]
pop edx
call fcn.0040b764
push dword [0x4122fc]
mov ebx, dword [esp + 0x3c]
add ebx, 0xd6
mov eax, ebx
call fcn.0040aecb
push dword [0x4122fc]
mov ebx, dword [esp + 0x44]
add ebx, 0xe1
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x48]
add ebx, 0xd6
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x4c]
add ebx, 0xe0
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x50]
add ebx, 0xd8
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x54]
add ebx, 0xd7
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x58]
add ebx, 0xde
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x5c]
add ebx, 0xd8
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x60]
add ebx, 0xe0
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x58]
add ebx, 0xe1
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x50]
add ebx, 0x95
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x54]
add ebx, 0xa2
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x40]
add ebx, 0xd6
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x50]
add ebx, 0x93
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x64]
add ebx, 0xd7
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x48]
add ebx, 0xd8
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x60]
add ebx, 0xdf
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x64]
add ebx, 0x93
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x68]
add ebx, 0x95
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x5c]
add ebx, 0xe1
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x4c]
add ebx, 0xdd
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x58]
add ebx, 0xeb
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x48]
add ebx, 0xdb
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x54]
add ebx, 0xd4
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x48]
add ebx, 0xe2
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x44]
add ebx, 0xe0
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x64]
add ebx, 0xd4
mov eax, ebx
call fcn.0040aecb
pop eax
push dword [0x4122fc]
mov ebx, dword [esp + 0x44]
add ebx, 0xd9
mov eax, ebx
call fcn.0040aecb
pop eax
lea ecx, [esp + 0x38]
pop edx
call fcn.0040b764
push dword [0x4122fc]
push 9
push 0xb
mov eax, dword [esp + 0x40]
call fcn.0040b01d
lea ecx, [esp + 0x68]
pop edx
call fcn.0040b764
mov edx, 0x41224b
lea ecx, [esp + 0x34]
call fcn.0040b7b0
mov dword [esp + 0x68], 1
mov eax, dword [esp + 0x64]
call fcn.0040b007
cmp eax, dword [esp + 0x68]
jl 0x4058b4
push dword [0x4122fc]
push 1
push dword [esp + 0x70]
mov eax, dword [esp + 0x70]
call fcn.0040b01d
lea ecx, [esp + 0x70]
pop edx
call fcn.0040b764
mov edx, dword [esp + 0x34]
push dword [0x4122fc]
call fcn.0040b810
push dword [0x4122fc]
mov eax, dword [esp + 0x74]
call fcn.0040aec0
mov ebx, eax
add ebx, 0xffffff8d
mov eax, ebx
call fcn.0040aecb
pop eax
lea ecx, [esp + 0x38]
pop edx
call fcn.0040b764
inc dword [esp + 0x68]
jmp 0x405848
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x64]
call fcn.0040b7b0
push dword [0x4122fc]
push 2
push 0x41224b
mov edx, dword [esp + 0x70]
push dword [0x4122fc]
call fcn.0040b810
mov edx, 0x41224f
call fcn.0040b810
mov edx, dword [esp + 0x38]
call fcn.0040b810
mov edx, dword [esp + 0x40]
call fcn.0040b810
mov edx, 0x41224f
call fcn.0040b810
inc dword [0x4122fc]
push dword [esp + 0x34]
call fcn.0040e150
pop dword [0x4122fc]
mov dword [esp + 0x70], eax
jmp 0x40ae7c
push dword [0x4152fc]
mov eax, dword [0x4151e8]
call fcn.00416200
push dword [esp]
mov eax, dword [0x4151ec]
call fcn.00416200
jmp 0x405945
jmp 0x405964
push dword [0x4152fc]
mov eax, dword [0x4151e8]
call fcn.00416200
push dword [esp]
mov eax, dword [0x4151ec]
call fcn.00416200
xor eax, eax
mov edx, dword [esp + 0x64]
call fcn.0040b830
mov edx, dword [esp + 0xc]
call fcn.0040b830
mov edx, dword [esp + 0x24]
call fcn.0040b830
mov edx, dword [esp + 0x28]
call fcn.0040b830
mov edx, dword [esp + 4]
call fcn.0040b830
mov edx, dword [esp + 8]
call fcn.0040b830
mov edx, dword [esp + 0x30]
call fcn.0040b830
mov edx, dword [esp + 0x2c]
call fcn.0040b830
mov edx, dword [esp + 0x6c]
call fcn.0040b830
mov edx, dword [esp + 0x34]
call fcn.0040b830
mov edx, dword [esp]
call fcn.0040b830
add esp, 0x74
pop edi
pop esi
pop ebp
pop ecx
pop ebx
ret 4