Function at 0x4e2610
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x228
lea ecx, [esp + 0x230]
push esi
push edi
push 0
push 0x54fc30
call fcn.00405c70
mov edi, eax
cmp edi, 0xffffffff
je 0x4e28e4
lea esi, [edi + 1]
test esi, esi
jl 0x4e28e4
mov eax, dword [esp + 0x238]
cmp esi, dword [eax - 8]
jg 0x4e28e4
lea eax, [eax + esi*2]
push 0x54fc30
push eax
call fcn.0053225f
add esp, 8
test eax, eax
je 0x4e28e4
mov edx, dword [esp + 0x238]
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x4e28e4
sub eax, edi
mov ecx, esi
dec eax
test ecx, ecx
jge 0x4e2689
xor ecx, ecx
test eax, eax
jge 0x4e268f
xor eax, eax
mov edx, dword [edx - 8]
lea esi, [ecx + eax]
cmp esi, edx
jle 0x4e269d
mov eax, edx
sub eax, ecx
cmp ecx, edx
jle 0x4e26a3
xor eax, eax
mov edx, dword [0x547570]
push 0
push ecx
push eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x244]
push eax
mov dword [esp + 0x18], edx
call fcn.00412500
lea ecx, [esp + 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405440
lea ecx, [esp + 8]
call fcn.00405700
mov edx, dword [0x554e0c]
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x2c]
mov dword [esp + 0x28], edx
push 0x208
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4e28db
mov edx, dword [0x547570]
mov eax, 0x54fc30
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
mov dword [esp + 0xc], edx
je 0x4e2774
mov ecx, eax
shr ecx, 0x10
jne 0x4e273f
xor edx, edx
lea ecx, [esp + 0xc]
mov dx, ax
push edx
call fcn.00413ae0
jmp 0x4e2774
push 0x54fc30
call ebx
mov esi, eax
test esi, esi
je 0x4e2774
push esi
lea ecx, [esp + 0x10]
call fcn.00405530
test eax, eax
je 0x4e2774
mov edi, dword [esp + 0xc]
lea ecx, [esi + esi]
mov edx, ecx
mov esi, 0x54fc30
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x547570]
mov ecx, 0x54fc30
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x4e27d3
mov edx, ecx
shr edx, 0x10
jne 0x4e279e
xor eax, eax
mov ax, cx
lea ecx, [esp + 0x14]
push eax
call fcn.00413ae0
jmp 0x4e27d3
push 0x54fc30
call ebx
mov esi, eax
test esi, esi
je 0x4e27d3
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x4e27d3
mov edi, dword [esp + 0x14]
lea ecx, [esi + esi]
mov edx, ecx
mov esi, 0x54fc30
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x547570]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax - 8]
mov eax, dword [esp + 0x18]
push ecx
push eax
mov edx, dword [eax - 8]
lea ecx, [esp + 0x2c]
push edx
call fcn.004059f0
lea eax, [esp + 0x20]
lea ecx, [esp + 0x10]
push eax
call fcn.00405440
lea ecx, [esp + 0x20]
call fcn.00405700
mov ecx, dword [0x547570]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], ecx
push eax
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x14]
push edx
push eax
mov eax, dword [eax - 8]
lea ecx, [esp + 0x28]
push eax
call fcn.004059f0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00405440
lea ecx, [esp + 0x1c]
call fcn.00405700
mov eax, dword [esp + 0x10]
mov ecx, dword [0x547574]
pop ebx
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4e287a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e287a
mov eax, dword [esp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.00532222
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00405700
lea ecx, [esp + 8]
call fcn.00405700
push 0x547f14
lea ecx, [esp + 0x10]
call fcn.00412590
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.00412eb0
lea ecx, [esp + 0xc]
call fcn.00405700
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0x240]
call fcn.00413840
lea ecx, [esp + 0x20]
call fcn.00405700
lea ecx, [esp + 0x24]
call fcn.00405700
lea ecx, [esp + 0x14]
call fcn.00405700
mov esi, dword [esp + 0x234]
lea edx, [esp + 0x238]
push edx
mov ecx, esi
call fcn.00405440
lea ecx, [esp + 0x238]
call fcn.00405700
mov eax, esi
pop edi
pop esi
add esp, 0x228
ret