Function at 0x4589b0
Capabilities:
Query environment variable

Disassembly:
sub esp, 8
push ebx
push ebp
shl eax, 4
add eax, dword [edx + 0xc]
push esi
push edi
mov edi, dword [esp + 0x1c]
test ecx, ecx
je 0x4589d9
push edi
call fcn.004a6010
lea eax, [eax + edi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4
mov ebx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x10], ebx
test eax, eax
je 0x458bde
mov esi, eax
mov dword [esp + 0x14], eax
mov eax, dword [esi]
test eax, eax
je 0x458bde
jmp 0x458a00
cmp ebx, eax
jae 0x458a12
mov cl, byte [ebx]
mov byte [edi], cl
inc ebx
inc edi
cmp ebx, eax
jb 0x458a04
mov dword [esp + 0x10], ebx
mov esi, dword [esi + 4]
movzx eax, byte [esi + 0x17]
mov ebp, edi
cmp eax, 3
ja case.default.0x458a24
jmp dword [eax*4 + 0x458c04]
mov eax, esi
call fcn.004015f0
cmp dword [0x4f0d40], 0
jne 0x458af8
cmp dword [esi + 0xc], 0
jne 0x458af8
cmp dword [0x4f4968], esi
jne 0x458a55
test edi, edi
jne 0x458abd
mov eax, dword [esi + 0x18]
push 0
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x458ab9
mov dword [0x4f4968], 0
test edi, edi
je 0x458ab3
cmp dword [0x4f0d1c], 0
je 0x458aa6
mov ecx, dword [esi + 0x18]
push ecx
push 0x4e5434
call fcn.0049be50
mov edx, dword [0x4f0d1c]
add esp, 4
push eax
push edx
push 0x4f1cd8
xor ecx, ecx
call fcn.0042d990
mov ecx, dword [esi + 0x18]
call fcn.004a4280
jmp 0x458bbd
dec eax
jmp 0x458bbd
test edi, edi
je 0x458aeb
cmp byte [esi + 0x17], 0
jne 0x458ac8
mov eax, dword [esi + 0xc]
jmp 0x458aca
mov eax, esi
test byte [eax + 0x15], 4
je 0x458ad7
mov eax, esi
call fcn.0042dad0
mov byte [edi], 0
mov dword [0x4f4968], 0
xor eax, eax
jmp 0x458bbd
mov dword [0x4f4968], esi
xor eax, eax
jmp 0x458bbd
mov ebx, dword [esi + 0xc]
test edi, edi
jne 0x458b0a
mov eax, ebx
mov ebx, dword [esp + 0x10]
jmp 0x458bbd
test ebx, ebx
jne 0x458b33
movzx eax, byte [esi + 0x17]
neg eax
sbb eax, eax
and eax, esi
test byte [eax + 0x15], 4
je 0x458b25
mov eax, esi
call fcn.0042dad0
mov ebx, dword [esp + 0x10]
mov byte [edi], 0
xor eax, eax
jmp 0x458bbd
mov ecx, dword [esi + 8]
cmp edi, ecx
jne 0x458b42
mov eax, ebx
mov ebx, dword [esp + 0x10]
jmp 0x458bbd
cmp ebx, 0x186a0
jae 0x458b67
mov al, byte [ecx]
test al, al
je 0x458b5b
inc ecx
mov byte [ebp], al
mov al, byte [ecx]
inc ebp
test al, al
jne 0x458b50
mov eax, ebx
mov ebx, dword [esp + 0x10]
mov byte [ebp], 0
jmp 0x458bbd
push ebx
push ecx
push edi
call fcn.004c3030
mov byte [ebx + edi], 0
mov eax, ebx
mov ebx, dword [esp + 0x1c]
add esp, 0xc
jmp 0x458bbd
mov ecx, dword [esi + 0xc]
push edi
call fcn.004a6010
jmp 0x458bbd
push edi
mov ecx, 0x4f2348
call fcn.00404730
cmp eax, 0xffffffff
jne 0x458b9b
xor eax, eax
test edi, edi
je 0x458bbd
mov byte [eax + edi], 0
jmp 0x458bbd
test edi, edi
je 0x458bac
mov byte [edi], 0
xor eax, eax
jmp 0x458bbd
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x10]
push eax
push edi
call ecx
add esp, 8
mov esi, dword [esp + 0x14]
movzx edx, word [esi + 0xa]
add esi, 0xc
add edi, eax
mov eax, dword [esi]
add ebx, edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], esi
test eax, eax
jne 0x458a00
mov al, byte [ebx]
test al, al
je 0x458bf3
mov ecx, ebx
sub ecx, edi
mov byte [edi], al
mov al, byte [ecx + edi + 1]
inc edi
test al, al
jne 0x458be8
mov byte [edi], 0
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4