Function at 0x4a0300
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x840
mov ebp, dword [esp + 0x854]
lea esi, [esp + 0x858]
mov dword [esp + 0x54], 0x5158cd
mov dword [esp + 0x58], 2
sub esp, 0xc
movsd xmm0, qword [esp + 0x60]
movsd qword [esp], xmm0
mov dword [esp + 8], 0
mov ecx, esi
call fcn.00461d40
cmp eax, 0xffffffff
je 0x4a0380
mov ebx, dword [esi + 4]
cmp ebx, 0xfffffff8
jae 0x4a0cae
mov edi, dword [esi]
cmp ebx, 0xb
jae 0x4a0436
mov eax, ebx
add al, bl
mov byte [esp + 0xf4], al
lea esi, [esp + 0xf5]
test ebx, ebx
jne 0x4a0468
jmp 0x4a0473
lea esi, [esp + 0x860]
xorps xmm0, xmm0
movsd qword [esp + 0x14], xmm0
mov dword [esp + 0x1c], 0
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x4a0498
mov eax, ebx
shl eax, 8
lea eax, [eax + ebx*4]
lea ecx, [esp + 0x14]
push eax
call fcn.00504efa
mov edi, dword [esi]
lea esi, [esp + 0x100]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [esp + 0xf4], esi
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0x104
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
sub esp, 0xc
movsd xmm0, qword [esp + 0x34]
movsd qword [esp], xmm0
lea eax, [esp + 0x100]
mov dword [esp + 8], eax
call fcn.004a8040
add esp, 0xc
test eax, eax
je 0x4a04a5
mov ebp, dword [esp + 0x854]
or byte [ebp + 0xc], 1
mov dword [ebp], eax
mov dword [ebp + 4], edx
mov eax, dword [esp + 0xf4]
cmp eax, esi
jne 0x4a0c4b
jmp 0x4a0c54
mov ebp, ebx
or ebp, 7
lea eax, [ebp + 1]
push eax
call sub.libc.dll_operator_new_unsigned_int_
add esp, 4
mov esi, eax
mov dword [esp + 0xfc], eax
add ebp, 2
mov dword [esp + 0xf4], ebp
mov ebp, dword [esp + 0x854]
mov dword [esp + 0xf8], ebx
push ebx
push edi
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
add esp, 0xc
mov byte [esi + ebx], 0
and byte [ebp + 0xc], 0xfe
movsd xmm0, qword [esp + 0xf4]
movsd qword [ebp], xmm0
mov eax, dword [esp + 0xfc]
mov dword [ebp + 8], eax
jmp 0x4a0c67
mov dword [esp + 0x10], 0
jmp 0x4a05cc
mov dword [esp + 0x5c], edi
mov eax, dword [esp + 0xf4]
mov ecx, dword [esp + 0xf8]
lea edx, [eax + ecx*2]
lea ecx, [esp + 0x14]
push edx
push eax
call fcn.004a0cd0
mov eax, dword [esp + 0xf4]
cmp eax, esi
je 0x4a04d9
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
cmp ebx, 1
jne 0x4a04f2
test byte [esp + 0x14], 1
je 0x4a05bd
mov eax, dword [esp + 0x1c]
jmp 0x4a05c1
mov edi, 1
lea ebp, [esp + 0x14]
mov dword [esp + 4], ebx
jmp 0x4a0519
inc edi
mov ebx, dword [esp + 4]
cmp ebx, edi
je 0x4a04de
mov ebx, ebp
mov ecx, ebp
push 0x3b
call fcn.00504f00
mov ecx, dword [esp + 0x5c]
mov eax, dword [ecx + edi*8]
mov ecx, dword [ecx + edi*8 + 4]
lea esi, [esp + 0x100]
mov dword [esp + 0xf4], esi
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0x104
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x34]
movsd qword [esp], xmm0
lea eax, [esp + 0x100]
mov dword [esp + 8], eax
call fcn.004a8040
add esp, 0xc
test eax, eax
jne 0x4a0411
mov eax, dword [esp + 0xf4]
mov ecx, dword [esp + 0xf8]
lea edx, [eax + ecx*2]
mov ebp, ebx
mov ecx, ebx
push edx
push eax
call fcn.004a0cd0
mov eax, dword [esp + 0xf4]
cmp eax, esi
je 0x4a0510
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x4a0510
lea eax, [esp + 0x16]
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x854]
lea edi, [esp + 0x100]
mov dword [esp + 0xf4], edi
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0x104
lea eax, [esp + 0x858]
movsd xmm0, qword [eax]
movsd qword [esp + 0xec], xmm0
sub esp, 0xc
movsd qword [esp], xmm0
lea eax, [esp + 0x100]
mov dword [esp + 8], eax
call fcn.004a8040
add esp, 0xc
test eax, eax
je 0x4a0632
or byte [ebp + 0xc], 1
mov dword [ebp], eax
mov dword [ebp + 4], edx
jmp 0x4a0c40
lea esi, [esp + 0x8c]
mov dword [esp + 0x80], esi
mov dword [esp + 0x88], 0xc
mov dword [esp + 0x8c], 0x5158d0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0x5158d1
mov dword [esp + 0x98], 4
mov dword [esp + 0x84], 2
push str.PATHEXT
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x4a073a
mov dword [esp + 0x4c], eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov dword [esp + 0x50], eax
mov dword [esp + 0x44], 0x5158de
mov dword [esp + 0x48], 1
sub esp, 0x14
movsd xmm0, qword [esp + 0x58]
movsd qword [esp + 0xc], xmm0
movsd xmm0, qword [esp + 0x60]
movsd qword [esp], xmm0
lea eax, [esp + 0x94]
mov dword [esp + 8], eax
call fcn.004c6020
add esp, 0x14
mov esi, dword [esp + 0x80]
mov eax, dword [esp + 0x84]
lea ecx, [esp + 0x314]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x308], ecx
mov dword [esp + 0x30c], 0
mov dword [esp + 0x310], 0x104
mov ecx, dword [ebp]
mov edx, dword [ebp + 4]
test eax, eax
je 0x4a0a6c
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
lea eax, [esi + eax*8]
mov dword [esp + 0x24], eax
jmp 0x4a077b
lea eax, [esp + 0x314]
mov dword [esp + 0x20], eax
mov dword [esp + 0x308], eax
mov dword [esp + 0x30c], 0
mov dword [esp + 0x310], 0x104
lea eax, [esp + 0x9c]
mov dword [esp + 0x24], eax
mov eax, dword [ebp]
mov dword [esp + 4], eax
mov eax, dword [ebp + 4]
mov dword [esp + 8], eax
lea edi, [esp + 0x638]
movzx eax, byte [ebp + 0xc]
mov byte [esp + 3], al
jmp 0x4a079d
add esi, 8
cmp esi, dword [esp + 0x24]
je 0x4a0a55
mov dword [esp + 0xc], esi
movsd xmm0, qword [esi]
movups xmmword [esp + 0x5c], xmm0
lea eax, [esp + 0x424]
mov dword [esp + 0x418], eax
mov dword [esp + 0x41c], 0
mov dword [esp + 0x420], 0x104
mov esi, 0x104
xor eax, eax
nop word cs:[eax + eax]
cmp eax, esi
je 0x4a080d
ja 0x4a0806
cmp dword [esp + 0x420], esi
jae 0x4a0806
lea ecx, [esp + 0x418]
push 2
push esi
lea eax, [esp + 0x42c]
push eax
call fcn.0046e2c0
mov dword [esp + 0x41c], esi
mov dword [esp + 0x62c], edi
mov dword [esp + 0x630], 0
mov dword [esp + 0x634], 0x104
lea ecx, [esp + 0x858]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], ecx
movups xmm0, xmmword [esp + 0x5c]
movlps qword [esp + 0x74], xmm0
mov word [esp + 0x7c], 0x505
lea ecx, [esp + 0x30]
lea eax, [esp + 0x6c]
push eax
call fcn.00465260
movzx eax, byte [esp + 0x30]
mov ecx, eax
shr ecx, 1
test al, 1
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x31]
cmove eax, edx
mov dword [esp + 0x3c], eax
cmovne ecx, dword [esp + 0x34]
mov dword [esp + 0x40], ecx
sub esp, 0xc
movsd xmm0, qword [esp + 0x48]
movsd qword [esp], xmm0
lea eax, [esp + 0x638]
mov dword [esp + 8], eax
call fcn.004a8040
add esp, 0xc
mov ebx, eax
mov ebp, edx
test byte [esp + 0x30], 1
je 0x4a08b8
push dword [esp + 0x38]
call sub.libc.dll_operator_delete_void_
add esp, 4
test ebx, ebx
je 0x4a0900
or byte [esp + 3], 1
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
mov eax, dword [esp + 0x62c]
cmp eax, edi
je 0x4a08dd
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov ebp, 1
test ebx, ebx
jne 0x4a0970
mov eax, dword [esp + 0x41c]
cmp esi, eax
ja 0x4a07e0
jmp 0x4a0980
mov eax, dword [esp + 0x630]
lea edx, [eax + 1]
cmp edx, dword [esp + 0x634]
ja 0x4a0952
mov ecx, dword [esp + 0x62c]
mov word [ecx + eax*2], 0
push 0
push dword [esp + 0x41c]
push dword [esp + 0x424]
push 0
push dword [esp + 0x63c]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov esi, eax
mov eax, dword [esp + 0x62c]
cmp eax, edi
jne 0x4a08d4
jmp 0x4a08dd
lea ecx, [esp + 0x62c]
push 2
push edx
push edi
call fcn.0046e2c0
mov eax, dword [esp + 0x630]
jmp 0x4a0913
mov esi, dword [esp + 0xc]
jmp 0x4a0a20
test esi, esi
je 0x4a09ba
mov dword [esp + 0x41c], esi
lea eax, [esp + 0x308]
push eax
push esi
push dword [esp + 0x420]
call fcn.004a8240
add esp, 0xc
test eax, eax
je 0x4a09c5
or byte [esp + 3], 1
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov esi, dword [esp + 0xc]
jmp 0x4a0a20
mov ebp, 6
mov esi, dword [esp + 0xc]
jmp 0x4a0a20
mov word [esp + 0x63c], 0x105
mov eax, dword [esp + 0x308]
mov ecx, dword [esp + 0x30c]
mov dword [esp + 0x62c], eax
mov dword [esp + 0x630], ecx
lea eax, [esp + 0x62c]
push eax
call fcn.004a93e0
add esp, 4
mov ebp, 5
test al, al
mov esi, dword [esp + 0xc]
jne 0x4a0a20
mov dword [esp + 0x30c], 0
xor ebp, ebp
nop word cs:[eax + eax]
mov eax, dword [esp + 0x418]
lea ecx, [esp + 0x424]
cmp eax, ecx
je 0x4a0a3b
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
test ebp, ebp
je 0x4a0790
cmp ebp, 6
je 0x4a0790
cmp ebp, 5
jne 0x4a0c74
mov ebp, dword [esp + 0x854]
movzx eax, byte [esp + 3]
mov byte [ebp + 0xc], al
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
mov dword [ebp], ecx
mov dword [ebp + 4], edx
cmp dword [esp + 0x30c], 0
je 0x4a0ace
lea eax, [esp + 0x308]
push 0
push eax
call fcn.004a3e30
add esp, 8
mov ebx, dword [esp + 0x30c]
cmp ebx, 0xfffffff8
jae 0x4a0cba
mov esi, dword [esp + 0x308]
cmp ebx, 0xb
jae 0x4a0b04
mov eax, ebx
add al, bl
mov byte [esp + 0x418], al
lea eax, [esp + 0x419]
mov ecx, eax
test ebx, ebx
lea edi, [esp + 0x100]
jne 0x4a0b2d
jmp 0x4a0bf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b0bb0
add esp, 4
or byte [ebp + 0xc], 1
mov dword [ebp + 4], edx
mov dword [ebp], eax
lea edi, [esp + 0x100]
mov eax, dword [esp + 0x308]
cmp eax, dword [esp + 0x20]
jne 0x4a0c1c
jmp 0x4a0c25
mov edi, ebx
or edi, 7
lea eax, [edi + 1]
push eax
call sub.libc.dll_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x420], eax
add edi, 2
mov dword [esp + 0x418], edi
mov dword [esp + 0x41c], ebx
cmp ebx, 0x20
jb 0x4a0b7d
mov ecx, eax
sub ecx, esi
cmp ecx, 0x20
jb 0x4a0b7d
mov edi, ebx
and edi, 0xffffffe0
lea edx, [esi + edi]
lea ecx, [eax + edi]
xor ebp, ebp
nop dword [eax + eax]
movups xmm0, xmmword [esi + ebp]
movups xmm1, xmmword [esi + ebp + 0x10]
movups xmmword [eax + ebp], xmm0
movups xmmword [eax + ebp + 0x10], xmm1
add ebp, 0x20
cmp edi, ebp
jne 0x4a0b50
cmp ebx, edi
mov ebp, dword [esp + 0x854]
lea edi, [esp + 0x100]
jne 0x4a0b81
jmp 0x4a0bf0
mov edx, esi
mov ecx, eax
add esi, ebx
mov edi, esi
sub edi, edx
mov eax, edx
and edi, 7
je 0x4a0b9a
nop
movzx ebx, byte [eax]
mov byte [ecx], bl
inc eax
inc ecx
dec edi
jne 0x4a0b90
sub edx, esi
cmp edx, 0xfffffff8
lea edi, [esp + 0x100]
ja 0x4a0bf0
nop dword [eax + eax]
movzx edx, byte [eax]
mov byte [ecx], dl
movzx edx, byte [eax + 1]
mov byte [ecx + 1], dl
movzx edx, byte [eax + 2]
mov byte [ecx + 2], dl
movzx edx, byte [eax + 3]
mov byte [ecx + 3], dl
movzx edx, byte [eax + 4]
mov byte [ecx + 4], dl
movzx edx, byte [eax + 5]
mov byte [ecx + 5], dl
movzx edx, byte [eax + 6]
mov byte [ecx + 6], dl
movzx edx, byte [eax + 7]
mov byte [ecx + 7], dl
add eax, 8
add ecx, 8
cmp eax, esi
jne 0x4a0bb0
mov byte [ecx], 0
and byte [ebp + 0xc], 0xfe
movsd xmm0, qword [esp + 0x418]
movsd qword [ebp], xmm0
mov eax, dword [esp + 0x420]
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x308]
cmp eax, dword [esp + 0x20]
je 0x4a0c25
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, dword [esp + 0x80]
lea ecx, [esp + 0x8c]
cmp eax, ecx
je 0x4a0c40
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, dword [esp + 0xf4]
cmp eax, edi
je 0x4a0c54
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
test byte [esp + 0x14], 1
je 0x4a0c67
push dword [esp + 0x1c]
call sub.libc.dll_operator_delete_void_
add esp, 4
mov eax, ebp
add esp, 0x840
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, dword [esp + 0x854]
movzx eax, byte [esp + 3]
mov byte [ebp + 0xc], al
mov eax, dword [esp + 4]
mov dword [ebp], eax
mov eax, dword [esp + 8]
mov dword [ebp + 4], eax
lea edi, [esp + 0x100]
mov eax, dword [esp + 0x308]
cmp eax, dword [esp + 0x20]
jne 0x4a0c1c
jmp 0x4a0c25
lea ecx, [esp + 0xf4]
call fcn.00401af0
lea ecx, [esp + 0x418]
call fcn.00401af0
int3