Function at 0x4a38e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x43c
mov esi, ecx
lea ecx, [ebp - 0x448]
push dword [ebp + 8]
call fcn.004854f0
add esp, 4
mov eax, dword [ebp - 0x448]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x4a3a0c
mov eax, dword [ebp - 0x444]
mov dword [ebp - 0x24], esi
mov esi, 0x200
xor ebx, ebx
mov dword [ebp - 0x38], 2
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x28], eax
cmp esi, 0x201
jae 0x4a3980
jmp 0x4a3961
mov ebx, dword [ebp - 0x14]
jbe 0x4a3a20
cmp esi, 0x201
jae 0x4a3980
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], 0x200
lea edi, [ebp - 0x448]
mov ebx, esi
jmp 0x4a39b1
mov eax, dword [ebp - 0x10]
sub esi, ebx
sub eax, ebx
cmp eax, esi
jae 0x4a39a2
mov edx, ebx
lea ecx, [ebp - 0x38]
push esi
call fcn.004859e0
add esp, 4
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x14], ebx
push 0
call sub.kernel32.dll_SetLastError
push ebx
push edi
push dword [ebp - 0x20]
call sub.kernel32.dll_GetEnvironmentVariableW
mov esi, eax
test eax, eax
jne 0x4a39d5
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x4a3afe
cmp esi, ebx
jne 0x4a3950
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x4a3b18
lea esi, [ebx + ebx]
test ebx, ebx
mov ebx, dword [ebp - 0x14]
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x4a3961
jmp 0x4a3980
lea ecx, [ebp - 0x448]
call fcn.00485680
mov byte [esi + 0xc], 2
jmp 0x4a3af3
mov edx, dword [ebp - 0x2c]
cmp esi, edx
ja 0x4a3b31
mov edx, edi
lea ecx, [ebp - 0x48]
push esi
call fcn.00486630
add esp, 4
mov eax, dword [ebp - 0x40]
movzx edx, word [ebp - 0x3b]
movzx ecx, byte [ebp - 0x39]
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x44]
movzx ebx, byte [ebp - 0x3c]
mov dword [ebp - 0x10], eax
mov word [ebp - 0x1c], dx
mov byte [ebp - 0x1a], cl
cmp dword [ebp - 0x14], 0
je 0x4a3a6e
push dword [ebp - 0x18]
push 0
push dword [0x5c9128]
call sub.kernel32.dll_HeapFree
cmp bl, 2
jne 0x4a3abe
mov eax, dword [ebp - 0x24]
mov byte [eax + 0xc], 2
mov eax, esi
cmp al, 3
jne 0x4a3add
mov eax, edi
mov edi, dword [edi]
mov ebx, dword [eax + 4]
mov esi, eax
mov eax, dword [ebx]
push edi
call eax
add esp, 4
cmp dword [ebx + 4], 0
je 0x4a3aae
cmp dword [ebx + 8], 9
jb 0x4a3aa0
mov edi, dword [edi - 4]
push edi
push 0
push dword [0x5c9128]
call sub.kernel32.dll_HeapFree
push esi
push 0
push dword [0x5c9128]
call sub.kernel32.dll_HeapFree
jmp 0x4a3add
movzx eax, word [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
mov bh, byte [ebp - 0x1a]
mov edx, dword [ebp - 0x10]
mov word [ecx + 0xd], ax
mov byte [ecx + 0xf], bh
mov dword [ecx], esi
mov dword [ecx + 4], edi
mov dword [ecx + 8], edx
mov byte [ecx + 0xc], bl
cmp dword [ebp - 0x28], 0
je 0x4a3af3
push dword [ebp - 0x20]
push 0
push dword [0x5c9128]
call sub.kernel32.dll_HeapFree
add esp, 0x43c
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
mov bl, 2
call sub.kernel32.dll_GetLastError
mov edi, eax
cmp dword [ebp - 0x14], 0
jne 0x4a3a5e
jmp 0x4a3a6e
mov edx, 0x28
mov ecx, 0x5a387e
push 0x56c70c
call fcn.00445340
add esp, 4
jmp 0x4a3b40
mov ecx, esi
push 0x56c6fc
call fcn.00445020
add esp, 4
ud2