Function at 0x4024c0
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x800c
call fcn.00406b60
push ebx
mov ebx, dword [esp + 0x8014]
push ebp
push esi
push edi
mov eax, ebx
xor edi, edi
xor ebp, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4024e0
sub eax, edx
mov esi, eax
lea eax, [esi + ebx]
push 0x25
push ebx
mov dword [esp + 0x20], eax
call fcn.00406aa0
add esp, 8
test eax, eax
je 0x402512
inc edi
inc eax
push 0x25
push eax
call fcn.00406aa0
add esp, 8
test eax, eax
jne 0x402501
cmp edi, 2
mov ecx, dword [esp + 0x8024]
mov dword [ecx], 0
jb 0x402742
cmp esi, 3
jb 0x402742
push 0x25
push ebx
mov edi, ebx
call fcn.00406aa0
mov esi, eax
add esp, 8
test esi, esi
je 0x4025f3
mov edx, esi
sub edx, edi
add ebp, edx
inc esi
push 0x25
push esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], esi
call fcn.00406aa0
add esp, 8
test eax, eax
je 0x4025d6
mov ebp, eax
sub ebp, esi
lea edx, [ebp + 1]
lea ecx, [eax + 1]
push edx
mov dword [esp + 0x14], ecx
call fcn.00405b95
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402735
mov ecx, ebp
mov eax, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x7ffe
lea edx, [esp + 0x20]
mov byte [ebx + ebp], 0
mov cl, byte [0x4139d8]
push edx
push ebx
mov byte [esp + 0x28], cl
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edx, dword [esp + 0x14]
add edx, eax
push ebx
mov dword [esp + 0x18], edx
call fcn.00405ba7
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x8024]
add esp, 4
mov eax, dword [esp + 0x10]
push 0x25
push eax
call fcn.00406aa0
mov edi, dword [esp + 0x18]
mov esi, eax
add esp, 8
test esi, esi
jne 0x402548
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x8024]
sub eax, edi
add ebp, eax
lea esi, [ebp + 1]
push esi
mov dword [ecx], ebp
call fcn.00405b95
mov ebp, eax
add esp, 4
xor eax, eax
test ebp, ebp
mov dword [esp + 0x14], ebp
je 0x40276b
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push 0x25
push ebx
rep stosb byte es:[edi], al
call fcn.00406aa0
mov esi, eax
add esp, 8
test esi, esi
je 0x4026f8
mov eax, esi
sub eax, ebx
je 0x402658
push eax
push ebx
push ebp
call fcn.00406740
add esp, 0xc
inc esi
push 0x25
push esi
mov dword [esp + 0x18], esi
call fcn.00406aa0
add esp, 8
test eax, eax
je 0x4026db
mov ebp, eax
sub ebp, esi
lea edx, [ebp + 2]
lea ecx, [eax + 1]
push edx
mov dword [esp + 0x14], ecx
call fcn.00405b95
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402735
mov ecx, ebp
mov eax, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x7ffe
lea edx, [esp + 0x20]
mov byte [ebx + ebp], 0
mov cl, byte [0x4139d9]
push edx
push ebx
mov byte [esp + 0x28], cl
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ecx, dword [esp + 0x14]
push eax
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.00406740
push ebx
call fcn.00405ba7
mov ebp, dword [esp + 0x24]
add esp, 0x10
mov edx, dword [esp + 0x10]
push 0x25
push edx
call fcn.00406aa0
mov ebx, dword [esp + 0x18]
mov esi, eax
add esp, 8
test esi, esi
jne 0x402647
mov eax, ebx
mov edx, ebx
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402700
mov edi, ebp
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402710
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x800c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x800c
ret
lea edi, [esi + 1]
push edi
call fcn.00405b95
add esp, 4
test eax, eax
je 0x402735
mov esi, eax
mov ecx, ebx
sub esi, ebx
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x402758
mov ecx, dword [esp + 0x8024]
mov dword [ecx], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800c
ret