Function at 0x403ba0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
mov ebp, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x3c
mov eax, dword [esp + 0x68]
test eax, eax
js 0x403bca
mov eax, dword [esp + 0x68]
or eax, 0x1c
test byte [esp + 0x68], 0x10
cmove eax, dword [esp + 0x68]
mov dword [esp + 0x68], eax
mov eax, dword [0x423194]
test eax, eax
je 0x403ce0
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x403be7
mov eax, dword [eax + 8]
test eax, eax
je 0x403be7
call eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00403a90
mov edx, dword [0x423194]
mov eax, dword [edx + 8]
test eax, eax
je 0x403c3d
mov edi, dword [edx + 0xc]
test edi, edi
jle 0x403c2f
xor edi, edi
mov eax, dword [eax + edi*4]
add edi, 1
mov eax, dword [eax - 4]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x423194]
cmp edi, dword [eax + 0xc]
mov eax, dword [eax + 8]
jl 0x403c11
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x423194]
mov eax, dword [edx + 0x30]
test eax, eax
je 0x403c52
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x423194]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x403c67
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x423194]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x403c7c
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x423194]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x403c91
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x423194]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x403ca6
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x423194]
mov eax, dword [edx + 0x70]
test eax, eax
je 0x403cce
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x423194]
mov eax, dword [eax + 0x7c]
mov dword [esp], eax
call fcn.00411e50
mov edx, dword [0x423194]
sub esp, 4
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [0x423194], 0
mov eax, dword [0x423188]
test eax, eax
je 0x403cfb
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [0x423188], 0
test ebx, ebx
je 0x404291
test esi, esi
je 0x404291
mov dword [esp + 4], 0x88
mov dword [esp], 1
mov dword [0x437cd8], 0x409850
mov dword [0x437cdc], 0x4097d0
mov dword [0x437ce0], 0x409810
mov dword [0x437ce4], 0x4098a0
mov dword [0x437ce8], 0x409b60
mov dword [0x437cec], 0x40a5f0
mov dword [0x437cf0], 0x40a6e0
mov dword [0x437cf4], 0x40a660
mov dword [0x437cf8], 0x40a670
mov dword [0x437cfc], 0x40a680
mov dword [0x437d00], 0x40a6b0
mov dword [0x437d04], 0x40a540
mov dword [0x437d08], 0x40a800
mov dword [0x437d0c], 0x40a8e0
mov dword [0x437d10], 0x40aae0
mov dword [0x437d14], 0x40ab40
mov dword [0x437d18], 0x40ac20
mov dword [0x437d1c], 0x40acb0
mov dword [0x437d20], 0x40ad60
mov dword [0x437d24], 0x4039d0
mov dword [0x437d28], 0x40af80
mov dword [0x437d2c], 0x40b0a0
mov dword [0x437d30], 0x40b1a0
mov dword [0x437d34], 0x40b2a0
mov dword [0x437d38], 0x409890
mov dword [0x437d3c], 0x40b560
mov dword [0x437d40], 0x40b580
call sub.msvcrt.dll_calloc
mov dword [0x423194], eax
mov edi, eax
test edi, edi
je 0x40424b
mov eax, dword [0x41b300]
mov ecx, dword [esp + 0x68]
mov dword [edi + 4], ebx
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], ebp
lea edx, [eax + 1]
test ecx, ecx
mov dword [edi], eax
mov dword [0x41b300], edx
js 0x403e68
test byte [esp + 0x68], 2
jne 0x404318
mov eax, dword [esp + 0x50]
mov dword [edi + 0x20], eax
mov ecx, eax
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x60]
mov edx, 0
lea eax, [eax*8 + 0x41c700]
test ebx, ebx
cmovs eax, edx
mov edx, dword [esp + 0x64]
mov dword [edi + 0x44], eax
mov eax, dword [esp + 0x54]
mov dword [edi + 0x48], eax
xor eax, eax
test edx, edx
js 0x403eac
mov eax, dword [esp + 0x64]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x41c720]
fldz
mov dword [edi + 0x54], eax
fld dword [esp + 0x6c]
fucompi st(1)
fstp st(0)
jp 0x4042f0
jne 0x4042f0
mov dword [esp + 0x24], esi
cmp ecx, 0x18
fild dword [esp + 0x24]
mov dword [esp + 0x24], ebp
fild dword [esp + 0x24]
fdivrp st(1)
fld qword [str.UUUUUU]
fmulp st(1)
fstp dword [edi + 0x60]
je 0x404300
jg 0x40437a
lea eax, [ecx - 0xf]
cmp eax, 1
ja 0x40437f
mov dword [edi + 0x40], 0xffff
mov dword [edi + 0x20], 0x10
mov ecx, 2
mov eax, dword [esp + 0x58]
mov dword [edi + 0x24], ecx
imul esi, ecx
shl eax, 2
mov dword [edi + 0x28], esi
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, dword [esp + 0x58]
mov dword [edi + 8], eax
test edx, edx
jle 0x403f8d
xor ebx, ebx
mov eax, ebp
mov edi, dword [esp + 0x58]
jmp 0x403f4b
mov eax, dword [0x423194]
mov esi, dword [eax + 0x28]
mov eax, dword [eax + 0x1c]
imul eax, esi
add eax, 0x12
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, dword [0x423194]
mov ecx, dword [edx + 8]
lea edx, [eax + 0x12]
and edx, 0xfffffff0
mov dword [ecx + ebx*4], edx
mov edx, dword [0x423194]
mov edx, dword [edx + 8]
mov edx, dword [edx + ebx*4]
add ebx, 1
cmp ebx, edi
mov dword [edx - 4], eax
jne 0x403f40
mov edi, dword [0x423194]
mov eax, dword [edi + 8]
mov ebp, dword [edi + 0x1c]
imul ebp, dword [edi + 0x48]
mov eax, dword [eax]
mov esi, dword [esp + 0x58]
mov dword [edi + 0x14], eax
mov dword [edi + 0xc], esi
mov dword [esp], 1
mov dword [esp + 4], ebp
call sub.msvcrt.dll_calloc
mov dword [edi + 0x38], eax
mov dword [esp + 4], 0x400
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov dword [edi + 0x30], eax
mov dword [esp + 4], 0x400
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov dword [edi + 0x2c], eax
mov dword [esp], 0x10
call sub.msvcrt.dll_malloc
mov dword [edi + 0x34], eax
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov dword [edi + 0x64], eax
mov dword [esp], 0xa00
call sub.msvcrt.dll_malloc
mov dword [edi + 0x70], eax
call fcn.00411e00
mov dword [edi + 0x7c], eax
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
cmp dword [esp + 0x68], 0xffffffff
mov dword [0x423188], eax
mov eax, dword [0x423194]
je 0x40407d
test byte [esp + 0x68], 0x40
je 0x40404e
mov edx, dword [eax + 0x80]
or edx, 8
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 2
je 0x404067
mov edx, dword [eax + 0x80]
or edx, 0x20000000
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 0x80
je 0x40407d
mov edx, dword [eax + 0x80]
or edx, 0x20
mov dword [eax + 0x80], edx
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call fcn.00406fd0
call fcn.00409690
mov ebx, dword [0x423184]
test ebx, ebx
je 0x4043af
mov edi, dword [0x423180]
test edi, edi
je 0x4043e8
cmp dword [esp + 0x68], 0xffffffff
je 0x40439d
mov dword [esp + 4], str.null
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x404180
mov eax, 4
sub eax, 1
mov dword [esp + 0x24], eax
lea esi, [esi]
mov eax, dword [esp + 0x24]
mov ebp, dword [0x41b30c]
xor ebx, ebx
add eax, 1
mov esi, eax
mov dword [esp + 0x28], eax
and esi, 1
test ebp, ebp
jne 0x404162
jmp 0x404330
test bl, 1
mov edx, 0
cmove edx, dword [esp + 0x5c]
mov ecx, dword [ebp + 4]
mov eax, dword [0x423194]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x68]
mov dword [esp + 0x14], edx
mov edx, dword [eax + 0x20]
mov dword [esp + 0xc], edx
mov edx, dword [eax + 0x1c]
imul edx, dword [eax + 0x48]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x18]
mov dword [esp + 4], eax
mov eax, dword [0x423184]
mov dword [esp], eax
call ecx
test eax, eax
je 0x404185
call dword [ebp + 8]
add ebx, 1
mov eax, ebx
sar eax, 1
mov ebp, dword [eax*4 + 0x41b30c]
test ebp, ebp
je 0x404330
test edi, edi
je 0x404101
test esi, esi
jne 0x404101
mov eax, dword [ebp]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
jne 0x40414c
jmp 0x404101
mov ebp, 0x41db20
mov eax, dword [0x423194]
xor esi, esi
mov dword [eax + 0x3c], ebp
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xffffffff
call fcn.0040b940
sub esp, 0x10
mov eax, dword [0x423194]
mov edx, dword [esp + 0x70]
mov dword [eax + 0x58], edx
mov edx, dword [esp + 0x74]
mov dword [eax + 0x5c], edx
call fcn.00407370
mov dword [esp + 4], 1
mov dword [esp], eax
mov ebp, eax
call fcn.00403a90
mov edx, dword [esp + 0x58]
mov eax, dword [0x423194]
mov edi, ebp
test edx, edx
jle 0x40422d
nop
mov edx, dword [eax + 0x1c]
mov ecx, dword [eax + 8]
xor ebx, ebx
test edx, edx
mov ebp, dword [ecx + esi*4]
jle 0x404224
nop
mov eax, dword [edi + 0x2c]
add ebx, 1
mov dword [esp + 8], eax
mov eax, dword [edi + 0x58]
mov dword [esp], ebp
mov dword [esp + 4], eax
call dword [edi + 0x64]
mov eax, dword [0x423194]
add ebp, dword [eax + 0x28]
cmp dword [eax + 0x1c], ebx
jg 0x404200
add esi, 1
cmp esi, dword [esp + 0x58]
jne 0x4041f0
mov ebx, dword [0x4230c0]
test ebx, ebx
jne 0x40424b
mov dword [0x4230c0], 1
mov dword [0x43bd90], 0x404420
cmp dword [esp + 0x68], 0x80000000
je 0x40427a
mov ecx, dword [0x423194]
xor eax, eax
mov dword [esp + 4], 0
mov dword [esp], 0
test ecx, ecx
setne al
mov dword [esp + 8], eax
call fcn.004133b0
mov dword [esp], 0
call fcn.00413290
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp dword [esp + 0x68], 0x80000000
mov edx, 0x437cd8
mov ecx, 0x1b
mov edi, edx
rep stosd dword es:[edi], eax
je 0x4042d1
mov dword [esp + 4], 0x19
mov dword [esp], 0x50
call fcn.00413510
sub esp, 8
mov dword [esp], 0
call fcn.004135a0
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0xffffffff
call fcn.00413670
mov edi, dword [0x423194]
jmp 0x403e34
fld dword [esp + 0x6c]
cmp ecx, 0x18
fstp dword [edi + 0x60]
jne 0x403eeb
mov dword [edi + 0x40], 0xffffffff
mov dword [edi + 0x20], 0x20
mov ecx, 4
jmp 0x403f10
cmp dword [esp + 0x50], 0x10
mov ecx, 0x10
cmovge ecx, dword [esp + 0x50]
mov dword [edi + 0x20], ecx
jmp 0x403e71
test edi, edi
je 0x404351
cmp dword [esp + 0x28], 3
je 0x40440f
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x40435e
sub dword [esp + 0x24], 1
jmp 0x4040e0
mov ecx, dword [esp + 0x24]
xor dword [esp + 0x68], 1
test ecx, ecx
jne 0x404347
call fcn.00404420
mov dword [esp], 1
call fcn.00413290
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ecx, 0x20
je 0x404300
mov eax, 1
shl eax, cl
sub eax, 1
mov dword [edi + 0x40], eax
lea eax, [ecx + 0xe]
add ecx, 7
cmovs ecx, eax
sar ecx, 3
jmp 0x403f10
mov ebp, 0x41db20
mov dword [esp + 0x68], 0xffffffff
jmp 0x404185
mov dword [esp + 4], 0x7f
mov dword [esp], 0x423100
call fcn.004136e0
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov dword [0x423184], eax
call sub.msvcrt.dll_strrchr
test eax, eax
je 0x40409b
mov byte [eax], 0
jmp 0x40409b
mov dword [esp], str.FBGFX
call sub.msvcrt.dll_getenv
cmp dword [esp + 0x68], 0xffffffff
mov edi, eax
je 0x40439d
test eax, eax
jne 0x4040b4
mov eax, 2
jmp 0x4040d2
xor dword [esp + 0x68], 1
jmp 0x404347