Function at 0x4063d0
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 0x4063fa
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 [0x428d34]
test eax, eax
je 0x406517
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x406417
mov eax, dword [eax + 8]
test eax, eax
je 0x406417
call eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004062b0
mov edx, dword [0x428d34]
mov eax, dword [edx + 8]
test eax, eax
je 0x406474
mov edi, dword [edx + 0xc]
test edi, edi
jle 0x406466
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 [0x428d34]
cmp edi, dword [eax + 0xc]
mov eax, dword [eax + 8]
jl 0x406448
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x428d34]
mov eax, dword [edx + 0x30]
test eax, eax
je 0x406489
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x428d34]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x40649e
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x428d34]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x4064b3
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x428d34]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x4064c8
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x428d34]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x4064dd
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x428d34]
mov eax, dword [edx + 0x70]
test eax, eax
je 0x406505
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x428d34]
mov eax, dword [eax + 0x7c]
mov dword [esp], eax
call fcn.0041b060
mov edx, dword [0x428d34]
sub esp, 4
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [0x428d34], 0
mov eax, dword [0x428d28]
test eax, eax
je 0x406532
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [0x428d28], 0
test esi, esi
je 0x406a20
test ebp, ebp
je 0x406a20
mov dword [esp + 4], 0x88
mov dword [esp], 1
mov dword [0x43cd38], 0x40e7c0
mov dword [0x43cd3c], 0x40e730
mov dword [0x43cd40], 0x40e780
mov dword [0x43cd44], 0x409b90
mov dword [0x43cd48], 0x409e40
mov dword [0x43cd4c], 0x40f510
mov dword [0x43cd50], 0x4073d0
mov dword [0x43cd54], 0x40f580
mov dword [0x43cd58], 0x40f590
mov dword [0x43cd5c], 0x40f5a0
mov dword [0x43cd60], 0x40f5d0
mov dword [0x43cd64], 0x40f220
mov dword [0x43cd68], 0x40f600
mov dword [0x43cd6c], 0x40f690
mov dword [0x43cd70], 0x40ec80
mov dword [0x43cd74], 0x40e570
mov dword [0x43cd78], 0x406ff0
mov dword [0x43cd7c], 0x407100
mov dword [0x43cd80], 0x4071b0
mov dword [0x43cd84], 0x4061e0
mov dword [0x43cd88], 0x40e810
mov dword [0x43cd8c], 0x40e930
mov dword [0x43cd90], 0x40f860
mov dword [0x43cd94], 0x407080
mov dword [0x43cd98], 0x40e800
mov dword [0x43cd9c], 0x405b90
mov dword [0x43cda0], 0x405bb0
mov dword [0x43cda4], 0
call sub.msvcrt.dll_calloc
mov dword [0x428d34], eax
mov edi, eax
test edi, edi
je 0x4069c0
mov eax, dword [0x4211c0]
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 [0x4211c0], 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 + 0x422a00]
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 0x4066d8
mov eax, dword [esp + 0x64]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x422a20]
fldz
fld dword [esp + 0x6c]
mov dword [edi + 0x54], eax
fucompi st(1)
fstp st(0)
jp 0x406707
jne 0x406707
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 0x406a90
jg 0x4069e5
mov eax, dword [esp + 0x50]
sub eax, 0xf
cmp eax, 1
ja 0x4069f0
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 0x4067ad
mov eax, ebx
xor esi, esi
mov ebx, dword [esp + 0x58]
jmp 0x406776
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 [0x428d34]
cmp ebx, esi
jne 0x406770
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.0041b010
mov dword [edi + 0x7c], eax
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
cmp dword [esp + 0x68], 0xffffffff
mov dword [0x428d28], eax
mov eax, dword [0x428d34]
je 0x40689e
test byte [esp + 0x68], 0x40
je 0x40686f
mov edx, dword [eax + 0x80]
or edx, 8
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 2
je 0x406888
mov edx, dword [eax + 0x80]
or edx, 0x20000000
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 0x80
je 0x40689e
mov edx, dword [eax + 0x80]
or edx, 0x20
mov dword [eax + 0x80], edx
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call fcn.004038e0
call fcn.0040a0a0
mov ebx, dword [0x428d24]
test ebx, ebx
je 0x406c3b
mov esi, dword [0x428d20]
test esi, esi
je 0x406c0d
cmp dword [esp + 0x68], 0xffffffff
jne 0x406ad3
mov dword [esp + 0x68], 0xffffffff
mov ebp, 0x423fa0
lea esi, [esi]
mov eax, dword [0x428d34]
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.00405f80
mov eax, dword [0x428d34]
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.00403c90
mov dword [esp + 4], 1
mov dword [esp], eax
mov ebp, eax
mov edi, ebp
call fcn.004062b0
mov edx, dword [esp + 0x58]
mov eax, dword [0x428d34]
test edx, edx
jle 0x40699d
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 0x406994
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 [0x428d34]
add ebp, dword [eax + 0x28]
cmp dword [eax + 0x1c], ebx
jg 0x406970
add esi, 1
cmp dword [esp + 0x58], esi
jne 0x406958
call fcn.00413600
mov ebx, dword [0x428c80]
test ebx, ebx
jne 0x4069c0
mov dword [0x428c80], 1
mov dword [0x440df0], 0x406c80
cmp dword [esp + 0x68], 0x80000000
jne 0x406a60
mov dword [esp], 0
call fcn.00413710
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x50], 0x20
je 0x406a90
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 0x406742
mov edx, 0x43cd38
xor eax, eax
mov ecx, 0x1c
cmp dword [esp + 0x68], 0x80000000
mov edi, edx
rep stosd dword es:[edi], eax
jne 0x406aa8
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0xffffffff
call fcn.00415e00
mov edi, dword [0x428d34]
jmp 0x406675
mov ecx, dword [0x428d34]
xor eax, eax
mov dword [esp + 4], 0
mov dword [esp], 0
test ecx, ecx
setne al
mov dword [esp + 8], eax
call fcn.00415c20
jmp 0x4069ce
mov dword [edi + 0x40], 0xffffffff
mov eax, 4
mov dword [edi + 0x20], 0x20
jmp 0x406742
mov dword [esp + 4], 0x19
mov dword [esp], 0x50
call fcn.00413bd0
sub esp, 8
mov dword [esp], 0
call fcn.00413980
sub esp, 4
jmp 0x406a3a
mov dword [esp + 4], str.null
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x406b9b
mov dword [esp + 0x2c], 4
mov edi, dword [esp + 0x68]
lea esi, [esi]
nop
mov eax, dword [esp + 0x2c]
mov ebp, dword [0x4211d0]
xor ebx, ebx
and eax, 1
mov dword [esp + 0x28], eax
test ebp, ebp
jne 0x406b79
jmp 0x406ba8
mov eax, dword [0x428d34]
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 [0x428d24]
mov dword [esp], eax
call ecx
test eax, eax
je 0x406bd0
call dword [ebp + 8]
add ebx, 1
mov eax, ebx
sar eax, 1
mov ebp, dword [eax*4 + 0x4211d0]
test ebp, ebp
je 0x406ba8
test esi, esi
je 0x406b20
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x406b20
mov eax, dword [ebp]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x406b20
jmp 0x406b67
mov ebp, 0x423fa0
jmp 0x4068e8
mov eax, dword [esp + 0x2c]
sub eax, 1
test esi, esi
je 0x406be0
cmp dword [esp + 0x2c], 3
je 0x406c08
test eax, eax
je 0x406be7
mov dword [esp + 0x2c], eax
jmp 0x406b00
mov dword [esp + 0x68], edi
jmp 0x4068e8
xor edi, 1
test eax, eax
jne 0x406bbe
call fcn.00406c80
mov dword [esp], 1
call fcn.00413710
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
xor edi, 1
jmp 0x406bbe
mov dword [esp], str.FBGFX
call sub.msvcrt.dll_getenv
cmp dword [esp + 0x68], 0xffffffff
mov esi, eax
je 0x4068d5
test eax, eax
jne 0x406ad3
mov dword [esp + 0x2c], 2
jmp 0x406af4
mov dword [esp + 4], 0x7f
mov dword [esp], 0x428ca0
call fcn.0041aef0
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov dword [0x428d24], eax
call sub.msvcrt.dll_strrchr
test eax, eax
je 0x4068bc
mov byte [eax], 0
jmp 0x4068bc