Function at 0x4587d0
Capabilities:
Query environment variable

Disassembly:
sub esp, 8
push ebx
push ebp
shl eax, 4
add eax, dword [edx + 8]
push esi
push edi
mov edi, dword [esp + 0x1c]
test ecx, ecx
je 0x4587f9
push edi
call fcn.004720a0
lea eax, [edi + eax*2 + 2]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4
mov ebp, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x10], ebp
test eax, eax
je 0x458a13
mov ecx, eax
mov dword [esp + 0x14], eax
mov eax, dword [ecx]
test eax, eax
je 0x458a13
jmp 0x458820
cmp ebp, eax
jae 0x458839
mov dx, word [ebp]
mov word [edi], dx
add ebp, 2
add edi, 2
cmp ebp, eax
jb 0x458824
mov dword [esp + 0x10], ebp
mov esi, dword [ecx + 4]
movzx eax, byte [esi + 0x17]
mov ebx, edi
cmp eax, 3
ja case.default.0x45884b
jmp dword [eax*4 + 0x458a44]
mov eax, esi
call fcn.00401160
cmp dword [0x4c200c], 0
jne 0x45890b
cmp dword [esi + 0xc], 0
jne 0x45890b
cmp dword [0x4c56d0], esi
jne 0x45887c
test edi, edi
jne 0x4588d5
mov ecx, dword [esi + 0x18]
push 0
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4588d1
mov dword [0x4c56d0], 0
test edi, edi
je 0x4588cb
mov eax, dword [0x4c1fec]
test eax, eax
je 0x4588be
mov edx, dword [esi + 0x18]
push edx
push str.Using_value_of_environment_variable.
push eax
push 0x4c4000
xor ecx, ecx
call fcn.0042f530
mov ecx, dword [esi + 0x18]
call fcn.00470710
jmp 0x4589eb
dec eax
jmp 0x4589eb
test edi, edi
je 0x4588fe
cmp byte [esi + 0x17], 0
jne 0x4588e0
mov eax, dword [esi + 0xc]
jmp 0x4588e2
mov eax, esi
test byte [eax + 0x15], 4
je 0x4588ef
mov eax, esi
call fcn.0042f660
xor eax, eax
mov word [edi], ax
mov dword [0x4c56d0], eax
jmp 0x4589eb
mov dword [0x4c56d0], esi
xor eax, eax
jmp 0x4589eb
mov eax, dword [esi + 0xc]
mov ebp, eax
shr ebp, 1
test edi, edi
jne 0x458921
mov eax, ebp
mov ebp, dword [esp + 0x10]
jmp 0x4589eb
test eax, eax
jne 0x45894c
movzx eax, byte [esi + 0x17]
neg eax
sbb eax, eax
and eax, esi
test byte [eax + 0x15], 4
je 0x45893c
mov eax, esi
call fcn.0042f660
mov ebp, dword [esp + 0x10]
xor ecx, ecx
mov word [edi], cx
xor eax, eax
jmp 0x4589eb
mov esi, dword [esi + 8]
cmp edi, esi
jne 0x45895e
mov eax, ebp
mov ebp, dword [esp + 0x10]
jmp 0x4589eb
cmp eax, 0x186a0
jae 0x45898e
mov ecx, esi
movzx eax, word [ecx]
test ax, ax
je 0x458981
nop
add ecx, 2
mov word [ebx], ax
movzx eax, word [ecx]
add ebx, 2
test ax, ax
jne 0x458970
xor edx, edx
mov eax, ebp
mov ebp, dword [esp + 0x10]
mov word [ebx], dx
jmp 0x4589eb
push eax
push esi
push edi
call fcn.004903a0
add esp, 0xc
xor eax, eax
mov word [edi + ebp*2], ax
mov eax, ebp
mov ebp, dword [esp + 0x10]
jmp 0x4589eb
mov ecx, dword [esi + 0xc]
push edi
call fcn.004720a0
jmp 0x4589eb
mov ecx, edi
mov ebx, 0x4c4b00
call fcn.00403a40
cmp eax, 0xffffffff
jne 0x4589c5
xor eax, eax
test edi, edi
je 0x4589eb
xor ecx, ecx
mov word [edi + eax*2], cx
jmp 0x4589eb
test edi, edi
je 0x4589da
xor edx, edx
mov word [edi], dx
xor eax, eax
jmp 0x4589eb
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x10]
push eax
push edi
call ecx
add esp, 8
mov ecx, dword [esp + 0x14]
movzx edx, word [ecx + 0xa]
lea edi, [edi + eax*2]
lea eax, [ebp + edx*2]
add ecx, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [ecx]
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x458820
movzx ecx, word [ebp]
test cx, cx
je 0x458a32
mov edx, ebp
sub edx, edi
mov word [edi], cx
movzx eax, word [edx + edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x458a20
xor ecx, ecx
mov word [edi], cx
lea eax, [edi + 2]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4