Function at 0x4048c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, edx
push edi
push esi
mov esi, eax
push ebx
mov ebx, ecx
sub esp, 0x3c
mov eax, dword [esp + 0x68]
test eax, eax
js 0x4048ea
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 [0x4200f4]
test eax, eax
je 0x404a07
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x404907
mov eax, dword [eax + 8]
test eax, eax
je 0x404907
call eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004047a0
mov edx, dword [0x4200f4]
mov eax, dword [edx + 8]
test eax, eax
je 0x404964
mov edi, dword [edx + 0xc]
test edi, edi
jle 0x404956
xor edi, edi
lea esi, [esi]
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 [0x4200f4]
cmp edi, dword [eax + 0xc]
mov eax, dword [eax + 8]
jl 0x404938
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x4200f4]
mov eax, dword [edx + 0x30]
test eax, eax
je 0x404979
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x4200f4]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x40498e
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x4200f4]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x4049a3
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x4200f4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x4049b8
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x4200f4]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x4049cd
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x4200f4]
mov eax, dword [edx + 0x70]
test eax, eax
je 0x4049f5
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x4200f4]
mov eax, dword [eax + 0x7c]
mov dword [esp], eax
call fcn.004167c0
mov edx, dword [0x4200f4]
sub esp, 4
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [0x4200f4], 0
mov eax, dword [0x4200e8]
test eax, eax
je 0x404a22
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [0x4200e8], 0
test esi, esi
je 0x404f10
test ebp, ebp
je 0x404f10
mov dword [esp + 4], 0x88
mov dword [esp], 1
mov dword [0x434c98], 0x40ccb0
mov dword [0x434c9c], 0x40cc20
mov dword [0x434ca0], 0x40cc70
mov dword [0x434ca4], 0x408080
mov dword [0x434ca8], 0x408330
mov dword [0x434cac], 0x40e530
mov dword [0x434cb0], 0x4058c0
mov dword [0x434cb4], 0x40e5a0
mov dword [0x434cb8], 0x40e5b0
mov dword [0x434cbc], 0x40e5c0
mov dword [0x434cc0], 0x40e5f0
mov dword [0x434cc4], 0x40e240
mov dword [0x434cc8], 0x40e620
mov dword [0x434ccc], 0x40e6b0
mov dword [0x434cd0], 0x40d170
mov dword [0x434cd4], 0x40ca60
mov dword [0x434cd8], 0x4054e0
mov dword [0x434cdc], 0x4055f0
mov dword [0x434ce0], 0x4056a0
mov dword [0x434ce4], 0x4046d0
mov dword [0x434ce8], 0x40cd00
mov dword [0x434cec], 0x40ce20
mov dword [0x434cf0], 0x40e880
mov dword [0x434cf4], 0x405570
mov dword [0x434cf8], 0x40ccf0
mov dword [0x434cfc], 0x404080
mov dword [0x434d00], 0x4040a0
mov dword [0x434d04], 0
call sub.msvcrt.dll_calloc
mov dword [0x4200f4], eax
mov edi, eax
test edi, edi
je 0x404eb0
mov eax, dword [0x41a098]
mov ecx, dword [esp + 0x64]
mov dword [edi + 4], esi
mov dword [edi + 0x18], ebp
lea edx, [eax + 1]
mov dword [edi], eax
mov eax, dword [esp + 0x50]
mov dword [0x41a098], edx
mov edx, dword [esp + 0x60]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x60]
test edx, edx
mov edx, 0
mov dword [edi + 0x1c], ebx
lea eax, [eax*8 + 0x41b420]
cmovs eax, edx
mov dword [edi + 0x44], eax
mov eax, dword [esp + 0x54]
mov dword [edi + 0x48], eax
xor eax, eax
test ecx, ecx
js 0x404bc8
mov eax, dword [esp + 0x64]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x41b440]
fldz
fld dword [esp + 0x6c]
mov dword [edi + 0x54], eax
fucompi st(1)
fstp st(0)
jp 0x404bf7
jne 0x404bf7
mov dword [esp + 0x28], ebp
fild dword [esp + 0x28]
mov dword [esp + 0x28], ebx
fild dword [esp + 0x28]
fdivrp st(1)
fld qword [str.UUUUUU]
fmulp st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
cmp dword [esp + 0x50], 0x18
fstp dword [edi + 0x60]
je 0x404f80
jg 0x404ed5
mov eax, dword [esp + 0x50]
sub eax, 0xf
cmp eax, 1
ja 0x404ee0
mov dword [edi + 0x40], 0xffff
mov eax, 2
mov dword [edi + 0x20], 0x10
mov dword [edi + 0x24], eax
imul ebp, eax
mov eax, dword [esp + 0x58]
shl eax, 2
mov dword [edi + 0x28], ebp
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, dword [esp + 0x58]
mov dword [edi + 8], eax
test esi, esi
jle 0x404c9d
mov eax, ebx
xor esi, esi
mov ebx, dword [esp + 0x58]
jmp 0x404c66
mov ebp, dword [edi + 0x28]
mov eax, dword [edi + 0x1c]
imul eax, ebp
add eax, 0x12
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ecx, dword [edi + 8]
lea edx, [eax + 0x12]
and edx, 0xfffffff0
mov dword [ecx + esi*4], edx
add esi, 1
mov dword [edx - 4], eax
mov edi, dword [0x4200f4]
cmp ebx, esi
jne 0x404c60
mov ecx, dword [edi + 0x48]
mov eax, dword [edi + 8]
mov ebx, dword [edi + 0x1c]
mov dword [esp + 0x54], ecx
imul ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov eax, dword [eax]
mov dword [edi + 0xc], ecx
mov dword [edi + 0x14], eax
mov dword [esp + 4], ebx
mov dword [esp], 1
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.00416770
mov dword [edi + 0x7c], eax
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
cmp dword [esp + 0x68], 0xffffffff
mov dword [0x4200e8], eax
mov eax, dword [0x4200f4]
je 0x404d8e
test byte [esp + 0x68], 0x40
je 0x404d5f
mov edx, dword [eax + 0x80]
or edx, 8
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 2
je 0x404d78
mov edx, dword [eax + 0x80]
or edx, 0x20000000
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 0x80
je 0x404d8e
mov edx, dword [eax + 0x80]
or edx, 0x20
mov dword [eax + 0x80], edx
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call fcn.00402900
call fcn.00408590
mov ebx, dword [0x4200e4]
test ebx, ebx
je 0x40512b
mov esi, dword [0x4200e0]
test esi, esi
je 0x4050fd
cmp dword [esp + 0x68], 0xffffffff
jne 0x404fc3
mov dword [esp + 0x68], 0xffffffff
mov ebp, 0x41c9c0
lea esi, [esi]
mov eax, dword [0x4200f4]
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.00404470
mov eax, dword [0x4200f4]
sub esp, 0x10
mov edx, dword [esp + 0x70]
mov dword [eax + 0x58], edx
mov edx, dword [esp + 0x74]
mov dword [eax + 0x5c], edx
call fcn.00402cb0
mov dword [esp + 4], 1
mov dword [esp], eax
mov ebp, eax
mov edi, ebp
call fcn.004047a0
mov edx, dword [esp + 0x58]
mov eax, dword [0x4200f4]
test edx, edx
jle 0x404e8d
lea esi, [esi]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0x1c]
xor ebx, ebx
mov ebp, dword [ecx + esi*4]
test edx, edx
jle 0x404e84
lea esi, [esi]
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 [0x4200f4]
add ebp, dword [eax + 0x28]
cmp dword [eax + 0x1c], ebx
jg 0x404e60
add esi, 1
cmp dword [esp + 0x58], esi
jne 0x404e48
call fcn.00412320
mov ebx, dword [0x420040]
test ebx, ebx
jne 0x404eb0
mov dword [0x420040], 1
mov dword [0x438d50], 0x405170
cmp dword [esp + 0x68], 0x80000000
jne 0x404f50
mov dword [esp], 0
call fcn.00412430
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x50], 0x20
je 0x404f80
movzx ecx, byte [esp + 0x50]
mov eax, 1
shl eax, cl
sub eax, 1
mov dword [edi + 0x40], eax
mov eax, dword [esp + 0x50]
lea edx, [eax + 0xe]
add eax, 7
cmovs eax, edx
sar eax, 3
jmp 0x404c32
mov edx, 0x434c98
xor eax, eax
mov ecx, 0x1c
cmp dword [esp + 0x68], 0x80000000
mov edi, edx
rep stosd dword es:[edi], eax
jne 0x404f98
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0xffffffff
call fcn.00414b80
mov edi, dword [0x4200f4]
jmp 0x404b65
mov ecx, dword [0x4200f4]
xor eax, eax
mov dword [esp + 4], 0
mov dword [esp], 0
test ecx, ecx
setne al
mov dword [esp + 8], eax
call fcn.004149a0
jmp 0x404ebe
mov dword [edi + 0x40], 0xffffffff
mov eax, 4
mov dword [edi + 0x20], 0x20
jmp 0x404c32
mov dword [esp + 4], 0x19
mov dword [esp], 0x50
call fcn.00412950
sub esp, 8
mov dword [esp], 0
call fcn.004126a0
sub esp, 4
jmp 0x404f2a
mov dword [esp + 4], str.null
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x40508b
mov dword [esp + 0x2c], 4
mov edi, dword [esp + 0x68]
lea esi, [esi]
nop
mov eax, dword [esp + 0x2c]
mov ebp, dword [0x41a0a8]
xor ebx, ebx
and eax, 1
mov dword [esp + 0x28], eax
test ebp, ebp
jne 0x405069
jmp 0x405098
mov eax, dword [0x4200f4]
test bl, 1
mov edx, 0
cmove edx, dword [esp + 0x5c]
mov ecx, dword [ebp + 4]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 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 [0x4200e4]
mov dword [esp], eax
call ecx
test eax, eax
je 0x4050c0
call dword [ebp + 8]
add ebx, 1
mov eax, ebx
sar eax, 1
mov ebp, dword [eax*4 + 0x41a0a8]
test ebp, ebp
je 0x405098
test esi, esi
je 0x405010
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x405010
mov eax, dword [ebp]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x405010
jmp 0x405057
mov ebp, 0x41c9c0
jmp 0x404dd8
mov eax, dword [esp + 0x2c]
sub eax, 1
test esi, esi
je 0x4050d0
cmp dword [esp + 0x2c], 3
je 0x4050f8
test eax, eax
je 0x4050d7
mov dword [esp + 0x2c], eax
jmp 0x404ff0
mov dword [esp + 0x68], edi
jmp 0x404dd8
xor edi, 1
test eax, eax
jne 0x4050ae
call fcn.00405170
mov dword [esp], 1
call fcn.00412430
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
xor edi, 1
jmp 0x4050ae
mov dword [esp], str.FBGFX
call sub.msvcrt.dll_getenv
cmp dword [esp + 0x68], 0xffffffff
mov esi, eax
je 0x404dc5
test eax, eax
jne 0x404fc3
mov dword [esp + 0x2c], 2
jmp 0x404fe4
mov dword [esp + 4], 0x7f
mov dword [esp], 0x420060
call fcn.00416650
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov dword [0x4200e4], eax
call sub.msvcrt.dll_strrchr
test eax, eax
je 0x404dac
mov byte [eax], 0
jmp 0x404dac