Function at 0x415b60
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 0x415b8a
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 [0x503ff4]
test eax, eax
je 0x415ca7
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x415ba7
mov eax, dword [eax + 8]
test eax, eax
je 0x415ba7
call eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00415a40
mov edx, dword [0x503ff4]
mov eax, dword [edx + 8]
test eax, eax
je 0x415c04
mov edi, dword [edx + 0xc]
test edi, edi
jle 0x415bf6
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 [0x503ff4]
cmp edi, dword [eax + 0xc]
mov eax, dword [eax + 8]
jl 0x415bd8
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x503ff4]
mov eax, dword [edx + 0x30]
test eax, eax
je 0x415c19
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x503ff4]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x415c2e
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x503ff4]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x415c43
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x503ff4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x415c58
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x503ff4]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x415c6d
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [0x503ff4]
mov eax, dword [edx + 0x70]
test eax, eax
je 0x415c95
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x503ff4]
mov eax, dword [eax + 0x7c]
mov dword [esp], eax
call fcn.0042a210
mov edx, dword [0x503ff4]
sub esp, 4
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [0x503ff4], 0
mov eax, dword [0x503fe8]
test eax, eax
je 0x415cc2
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [0x503fe8], 0
test esi, esi
je 0x4161b0
test ebp, ebp
je 0x4161b0
mov dword [esp + 4], 0x88
mov dword [esp], 1
mov dword [0x506b58], 0x41eb40
mov dword [0x506b5c], 0x41eab0
mov dword [0x506b60], 0x41eb00
mov dword [0x506b64], 0x419520
mov dword [0x506b68], 0x4197d0
mov dword [0x506b6c], 0x420180
mov dword [0x506b70], 0x416b60
mov dword [0x506b74], 0x4201f0
mov dword [0x506b78], 0x420200
mov dword [0x506b7c], 0x420210
mov dword [0x506b80], 0x420240
mov dword [0x506b84], 0x41fe90
mov dword [0x506b88], 0x420270
mov dword [0x506b8c], 0x420300
mov dword [0x506b90], 0x41edc0
mov dword [0x506b94], 0x41e8c0
mov dword [0x506b98], 0x416780
mov dword [0x506b9c], 0x416890
mov dword [0x506ba0], 0x416940
mov dword [0x506ba4], 0x415970
mov dword [0x506ba8], 0x41eb90
mov dword [0x506bac], 0x41ecb0
mov dword [0x506bb0], 0x4204d0
mov dword [0x506bb4], 0x416810
mov dword [0x506bb8], 0x41eb80
mov dword [0x506bbc], 0x414bb0
mov dword [0x506bc0], 0x414bd0
mov dword [0x506bc4], 0
call sub.msvcrt.dll_calloc
mov dword [0x503ff4], eax
mov edi, eax
test edi, edi
je 0x416150
mov eax, dword [0x432960]
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 [0x432960], 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 + 0x435cc0]
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 0x415e68
mov eax, dword [esp + 0x64]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x435ce0]
fldz
fld dword [esp + 0x6c]
mov dword [edi + 0x54], eax
fucompi st(1)
fstp st(0)
jp 0x415e97
jne 0x415e97
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 0x416220
jg 0x416175
mov eax, dword [esp + 0x50]
sub eax, 0xf
cmp eax, 1
ja 0x416180
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 0x415f3d
mov eax, ebx
xor esi, esi
mov ebx, dword [esp + 0x58]
jmp 0x415f06
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 [0x503ff4]
cmp ebx, esi
jne 0x415f00
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.0042a1c0
mov dword [edi + 0x7c], eax
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
cmp dword [esp + 0x68], 0xffffffff
mov dword [0x503fe8], eax
mov eax, dword [0x503ff4]
je 0x41602e
test byte [esp + 0x68], 0x40
je 0x415fff
mov edx, dword [eax + 0x80]
or edx, 8
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 2
je 0x416018
mov edx, dword [eax + 0x80]
or edx, 0x20000000
mov dword [eax + 0x80], edx
test byte [esp + 0x68], 0x80
je 0x41602e
mov edx, dword [eax + 0x80]
or edx, 0x20
mov dword [eax + 0x80], edx
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call fcn.00419fa0
call fcn.00413380
mov ebx, dword [0x503fe4]
test ebx, ebx
je 0x4163cb
mov esi, dword [0x503fe0]
test esi, esi
je 0x41639d
cmp dword [esp + 0x68], 0xffffffff
jne 0x416263
mov dword [esp + 0x68], 0xffffffff
mov ebp, 0x437760
lea esi, [esi]
mov eax, dword [0x503ff4]
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.00414fa0
mov eax, dword [0x503ff4]
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.0041a350
mov dword [esp + 4], 1
mov dword [esp], eax
mov ebp, eax
mov edi, ebp
call fcn.00415a40
mov edx, dword [esp + 0x58]
mov eax, dword [0x503ff4]
test edx, edx
jle 0x41612d
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 0x416124
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 [0x503ff4]
add ebp, dword [eax + 0x28]
cmp dword [eax + 0x1c], ebx
jg 0x416100
add esi, 1
cmp dword [esp + 0x58], esi
jne 0x4160e8
call fcn.00410c80
mov ebx, dword [0x503f40]
test ebx, ebx
jne 0x416150
mov dword [0x503f40], 1
mov dword [0x50ac10], 0x416410
cmp dword [esp + 0x68], 0x80000000
jne 0x4161f0
mov dword [esp], 0
call fcn.00410d90
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x50], 0x20
je 0x416220
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 0x415ed2
mov edx, 0x506b58
xor eax, eax
mov ecx, 0x1c
cmp dword [esp + 0x68], 0x80000000
mov edi, edx
rep stosd dword es:[edi], eax
jne 0x416238
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0xffffffff
call fcn.0040c7a0
mov edi, dword [0x503ff4]
jmp 0x415e05
mov ecx, dword [0x503ff4]
xor eax, eax
mov dword [esp + 4], 0
mov dword [esp], 0
test ecx, ecx
setne al
mov dword [esp + 8], eax
call fcn.0040c5c0
jmp 0x41615e
mov dword [edi + 0x40], 0xffffffff
mov eax, 4
mov dword [edi + 0x20], 0x20
jmp 0x415ed2
mov dword [esp + 4], 0x19
mov dword [esp], 0x50
call fcn.00408940
sub esp, 8
mov dword [esp], 0
call fcn.00408640
sub esp, 4
jmp 0x4161ca
mov dword [esp + 4], str.null
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x41632b
mov dword [esp + 0x2c], 4
mov edi, dword [esp + 0x68]
lea esi, [esi]
nop
mov eax, dword [esp + 0x2c]
mov ebp, dword [0x432970]
xor ebx, ebx
and eax, 1
mov dword [esp + 0x28], eax
test ebp, ebp
jne 0x416309
jmp 0x416338
mov eax, dword [0x503ff4]
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 [0x503fe4]
mov dword [esp], eax
call ecx
test eax, eax
je 0x416360
call dword [ebp + 8]
add ebx, 1
mov eax, ebx
sar eax, 1
mov ebp, dword [eax*4 + 0x432970]
test ebp, ebp
je 0x416338
test esi, esi
je 0x4162b0
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x4162b0
mov eax, dword [ebp]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x4162b0
jmp 0x4162f7
mov ebp, 0x437760
jmp 0x416078
mov eax, dword [esp + 0x2c]
sub eax, 1
test esi, esi
je 0x416370
cmp dword [esp + 0x2c], 3
je 0x416398
test eax, eax
je 0x416377
mov dword [esp + 0x2c], eax
jmp 0x416290
mov dword [esp + 0x68], edi
jmp 0x416078
xor edi, 1
test eax, eax
jne 0x41634e
call fcn.00416410
mov dword [esp], 1
call fcn.00410d90
sub esp, 4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
xor edi, 1
jmp 0x41634e
mov dword [esp], str.FBGFX
call sub.msvcrt.dll_getenv
cmp dword [esp + 0x68], 0xffffffff
mov esi, eax
je 0x416065
test eax, eax
jne 0x416263
mov dword [esp + 0x2c], 2
jmp 0x416284
mov dword [esp + 4], 0x7f
mov dword [esp], 0x503f60
call fcn.0042a170
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov dword [0x503fe4], eax
call sub.msvcrt.dll_strrchr
test eax, eax
je 0x41604c
mov byte [eax], 0
jmp 0x41604c