Function at 0x407b30
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 0x407b5a
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 [0x425914]
test eax, eax
je 0x407c77
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x407b77
mov eax, dword [eax + 8]
test eax, eax
je 0x407b77
call eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00407a10
mov edx, dword [0x425914]
mov eax, dword [edx + 8]
test eax, eax
je 0x407bd4
mov edi, dword [edx + 0xc]
test edi, edi
jle 0x407bc6
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 [0x425914]
cmp edi, dword [eax + 0xc]
mov eax, dword [eax + 8]
jl 0x407ba8
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x425914]
mov eax, dword [edx + 0x30]
test eax, eax
je 0x407be9
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x425914]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x407bfe
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x425914]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x407c13
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x425914]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x407c28
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x425914]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x407c3d
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x425914]
mov eax, dword [edx + 0x70]
test eax, eax
je 0x407c65
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x425914]
mov eax, dword [eax + 0x7c]
mov dword [esp], eax
call fcn.00418f30
mov edx, dword [0x425914]
sub esp, 4
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [0x425914], 0
mov eax, dword [0x425908]
test eax, eax
je 0x407c92
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [0x425908], 0
test esi, esi
je 0x408180
test ebp, ebp
je 0x408180
mov dword [esp + 4], 0x88
mov dword [esp], 1
mov dword [0x42a4b8], 0x40fde0
mov dword [0x42a4bc], 0x40fd50
mov dword [0x42a4c0], 0x40fda0
mov dword [0x42a4c4], 0x40b1b0
mov dword [0x42a4c8], 0x40b460
mov dword [0x42a4cc], 0x411a50
mov dword [0x42a4d0], 0x408b30
mov dword [0x42a4d4], 0x411ac0
mov dword [0x42a4d8], 0x411ad0
mov dword [0x42a4dc], 0x411ae0
mov dword [0x42a4e0], 0x411b10
mov dword [0x42a4e4], 0x411760
mov dword [0x42a4e8], 0x411b40
mov dword [0x42a4ec], 0x411bd0
mov dword [0x42a4f0], 0x4102a0
mov dword [0x42a4f4], 0x40fb90
mov dword [0x42a4f8], 0x408750
mov dword [0x42a4fc], 0x408860
mov dword [0x42a500], 0x408910
mov dword [0x42a504], 0x407940
mov dword [0x42a508], 0x40fe30
mov dword [0x42a50c], 0x40ff50
mov dword [0x42a510], 0x411da0
mov dword [0x42a514], 0x4087e0
mov dword [0x42a518], 0x40fe20
mov dword [0x42a51c], 0x411090
mov dword [0x42a520], 0x4110b0
mov dword [0x42a524], 0
call sub.msvcrt.dll_calloc
mov dword [0x425914], eax
mov edi, eax
test edi, edi
je 0x408120
mov eax, dword [0x41bae0]
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 [0x41bae0], 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 + 0x41c800]
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 0x407e38
mov eax, dword [esp + 0x64]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x41c820]
fldz
fld dword [esp + 0x6c]
mov dword [edi + 0x54], eax
fucompi st(1)
fstp st(0)
jp 0x407e67
jne 0x407e67
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 0x4081f0
jg 0x408145
mov eax, dword [esp + 0x50]
sub eax, 0xf
cmp eax, 1
ja 0x408150
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 0x407f0d
mov eax, ebx
xor esi, esi
mov ebx, dword [esp + 0x58]
jmp 0x407ed6
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 [0x425914]
cmp ebx, esi
jne 0x407ed0
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.00418ee0
mov dword [edi + 0x7c], eax
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
cmp dword [esp + 0x68], 0xffffffff
mov dword [0x425908], eax
mov eax, dword [0x425914]
je 0x407ffe
test byte [esp + 0x68], 0x40
je 0x407fcf
mov edx, dword [eax + 0x80]
or edx, 8
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 2
je 0x407fe8
mov edx, dword [eax + 0x80]
or edx, 0x20000000
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 0x80
je 0x407ffe
mov edx, dword [eax + 0x80]
or edx, 0x20
mov dword [eax + 0x80], edx
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call fcn.004066f0
call fcn.0040b6c0
mov ebx, dword [0x425904]
test ebx, ebx
je 0x40839b
mov esi, dword [0x425900]
test esi, esi
je 0x40836d
cmp dword [esp + 0x68], 0xffffffff
jne 0x408233
mov dword [esp + 0x68], 0xffffffff
mov ebp, 0x41dda0
lea esi, [esi]
mov eax, dword [0x425914]
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.004076e0
mov eax, dword [0x425914]
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.00406aa0
mov dword [esp + 4], 1
mov dword [esp], eax
mov ebp, eax
mov edi, ebp
call fcn.00407a10
mov edx, dword [esp + 0x58]
mov eax, dword [0x425914]
test edx, edx
jle 0x4080fd
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 0x4080f4
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 [0x425914]
add ebp, dword [eax + 0x28]
cmp dword [eax + 0x1c], ebx
jg 0x4080d0
add esi, 1
cmp dword [esp + 0x58], esi
jne 0x4080b8
call fcn.00404ee0
mov ebx, dword [0x425860]
test ebx, ebx
jne 0x408120
mov dword [0x425860], 1
mov dword [0x42e570], 0x4083e0
cmp dword [esp + 0x68], 0x80000000
jne 0x4081c0
mov dword [esp], 0
call fcn.00404ff0
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x50], 0x20
je 0x4081f0
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 0x407ea2
mov edx, 0x42a4b8
xor eax, eax
mov ecx, 0x1c
cmp dword [esp + 0x68], 0x80000000
mov edi, edx
rep stosd dword es:[edi], eax
jne 0x408208
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0xffffffff
call fcn.00403600
mov edi, dword [0x425914]
jmp 0x407dd5
mov ecx, dword [0x425914]
xor eax, eax
mov dword [esp + 4], 0
mov dword [esp], 0
test ecx, ecx
setne al
mov dword [esp + 8], eax
call fcn.00417e50
jmp 0x40812e
mov dword [edi + 0x40], 0xffffffff
mov eax, 4
mov dword [edi + 0x20], 0x20
jmp 0x407ea2
mov dword [esp + 4], 0x19
mov dword [esp], 0x50
call fcn.00416e80
sub esp, 8
mov dword [esp], 0
call fcn.00402350
sub esp, 4
jmp 0x40819a
mov dword [esp + 4], str.null
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x4082fb
mov dword [esp + 0x2c], 4
mov edi, dword [esp + 0x68]
lea esi, [esi]
nop
mov eax, dword [esp + 0x2c]
mov ebp, dword [0x41baf0]
xor ebx, ebx
and eax, 1
mov dword [esp + 0x28], eax
test ebp, ebp
jne 0x4082d9
jmp 0x408308
mov eax, dword [0x425914]
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 [0x425904]
mov dword [esp], eax
call ecx
test eax, eax
je 0x408330
call dword [ebp + 8]
add ebx, 1
mov eax, ebx
sar eax, 1
mov ebp, dword [eax*4 + 0x41baf0]
test ebp, ebp
je 0x408308
test esi, esi
je 0x408280
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x408280
mov eax, dword [ebp]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x408280
jmp 0x4082c7
mov ebp, 0x41dda0
jmp 0x408048
mov eax, dword [esp + 0x2c]
sub eax, 1
test esi, esi
je 0x408340
cmp dword [esp + 0x2c], 3
je 0x408368
test eax, eax
je 0x408347
mov dword [esp + 0x2c], eax
jmp 0x408260
mov dword [esp + 0x68], edi
jmp 0x408048
xor edi, 1
test eax, eax
jne 0x40831e
call fcn.004083e0
mov dword [esp], 1
call fcn.00404ff0
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
xor edi, 1
jmp 0x40831e
mov dword [esp], str.FBGFX
call sub.msvcrt.dll_getenv
cmp dword [esp + 0x68], 0xffffffff
mov esi, eax
je 0x408035
test eax, eax
jne 0x408233
mov dword [esp + 0x2c], 2
jmp 0x408254
mov dword [esp + 4], 0x7f
mov dword [esp], 0x425880
call fcn.00418e90
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov dword [0x425904], eax
call sub.msvcrt.dll_strrchr
test eax, eax
je 0x40801c
mov byte [eax], 0
jmp 0x40801c