Function at 0x4e2920
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x68c
lea eax, [esp + 0x694]
push ebx
push esi
push edi
push eax
call fcn.004b9eb0
add esp, 4
lea ecx, [esp + 0x6a0]
push 0
push 0x54fc30
call fcn.00405c70
mov edi, eax
cmp edi, 0xffffffff
je 0x4e2cd9
mov ecx, dword [esp + 0x6a4]
lea edx, [esp + 0x6a0]
push ecx
push ecx
mov ecx, esp
push edx
call fcn.00405440
lea eax, [esp + 0x20]
push eax
call fcn.004e1ca0
mov ecx, dword [esp + 0x6ac]
mov esi, eax
add esp, 0xc
mov eax, dword [esi]
cmp ecx, eax
je 0x4e29d8
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x4e299f
mov edx, dword [0x547574]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x4e29a6
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4e29b9
mov ecx, dword [eax - 8]
push eax
push ecx
lea ecx, [esp + 0x6a8]
call fcn.00405870
jmp 0x4e29d8
lea ecx, [esp + 0x6a0]
call fcn.004124c0
mov esi, dword [esi]
mov dword [esp + 0x6a0], esi
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x547574]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4e2a07
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e2a07
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
push eax
call fcn.00532222
add esp, 4
lea esi, [edi + 1]
test esi, esi
jl 0x4e2cd9
mov eax, dword [esp + 0x6a0]
cmp esi, dword [eax - 8]
jg 0x4e2cd9
lea eax, [eax + esi*2]
push 0x54fc30
push eax
call fcn.0053225f
add esp, 8
test eax, eax
je 0x4e2cd9
mov edx, dword [esp + 0x6a0]
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x4e2cd9
sub eax, edi
mov ecx, esi
dec eax
test ecx, ecx
jge 0x4e2a5a
xor ecx, ecx
test eax, eax
jge 0x4e2a60
xor eax, eax
mov edx, dword [edx - 8]
lea esi, [ecx + eax]
cmp esi, edx
jle 0x4e2a6e
mov eax, edx
sub eax, ecx
cmp ecx, edx
jle 0x4e2a74
xor eax, eax
mov edx, dword [0x547570]
push 0
push ecx
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x6ac]
push eax
mov dword [esp + 0x1c], edx
call fcn.00412500
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00405440
lea ecx, [esp + 0xc]
call fcn.00405700
mov edx, dword [0x554e0c]
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x30]
mov dword [esp + 0x2c], edx
push 0x208
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4e2cd0
mov edx, dword [0x547570]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov eax, 0x54fc30
mov dword [esp + 0xc], edx
test eax, eax
je 0x4e2b44
mov ecx, eax
shr ecx, 0x10
jne 0x4e2b0f
xor edx, edx
lea ecx, [esp + 0xc]
mov dx, ax
push edx
call fcn.00413ae0
jmp 0x4e2b44
push 0x54fc30
call ebx
mov esi, eax
test esi, esi
je 0x4e2b44
push esi
lea ecx, [esp + 0x10]
call fcn.00405530
test eax, eax
je 0x4e2b44
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 + 0x10], eax
je 0x4e2ba3
mov edx, ecx
shr edx, 0x10
jne 0x4e2b6e
xor eax, eax
mov ax, cx
lea ecx, [esp + 0x10]
push eax
call fcn.00413ae0
jmp 0x4e2ba3
push 0x54fc30
call ebx
mov esi, eax
test esi, esi
je 0x4e2ba3
push esi
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
je 0x4e2ba3
mov edi, dword [esp + 0x10]
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 + 0x24], eax
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax - 8]
mov eax, dword [esp + 0x14]
push ecx
push eax
mov edx, dword [eax - 8]
lea ecx, [esp + 0x30]
push edx
call fcn.004059f0
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1c]
push eax
call fcn.00405440
lea ecx, [esp + 0x24]
call fcn.00405700
mov ecx, dword [0x547570]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x28], ecx
push eax
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x20]
push edx
push eax
mov eax, dword [eax - 8]
lea ecx, [esp + 0x34]
push eax
call fcn.004059f0
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405440
lea ecx, [esp + 0x28]
call fcn.00405700
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x547574]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4e2c49
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e2c49
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
push eax
call fcn.00532222
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e2c78
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e2c78
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
lea ecx, [esp + 0xc]
call fcn.00405700
push 0x547f14
lea ecx, [esp + 0x20]
call fcn.00412590
push eax
lea eax, [esp + 0x30]
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00412eb0
lea ecx, [esp + 0x1c]
call fcn.00405700
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x6a8]
call fcn.00413840
lea ecx, [esp + 0x20]
call fcn.00405700
lea ecx, [esp + 0x14]
call fcn.00405700
lea ecx, [esp + 0x18]
call fcn.00405700
push 0
push 0x54dc30
lea ecx, [esp + 0x6a8]
call fcn.00405c70
test eax, eax
jge 0x4e2d0b
push 0
push 0x549c48
lea ecx, [esp + 0x6a8]
call fcn.00405c70
test eax, eax
jl 0x4e2dd9
lea ecx, [esp + 0x6a0]
lea edx, [esp + 0x20]
push ecx
push 0x547f14
push edx
call fcn.004b7e30
add esp, 4
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00412d60
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.00412c10
lea ecx, [esp + 0x14]
call fcn.00405700
lea ecx, [esp + 0x20]
call fcn.00405700
lea edx, [esp + 0xc]
push edx
call fcn.004b9eb0
mov eax, dword [esp + 0x10]
add esp, 4
lea ecx, [esp + 0x234]
mov word [esp + 0x68c], 0x5c
push eax
mov dword [esp + 0x694], 0
mov dword [esp + 0x698], 0
call fcn.00413f30
test eax, eax
je 0x4e2db3
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x238]
call fcn.00413ce0
push eax
lea ecx, [esp + 0x10]
call fcn.00412800
lea ecx, [esp + 0x14]
call fcn.00405700
lea edx, [esp + 0xc]
lea ecx, [esp + 0x6a0]
push edx
call fcn.00412800
lea ecx, [esp + 0x234]
call fcn.00414040
lea ecx, [esp + 0xc]
call fcn.00405700
lea eax, [esp + 0x6a0]
push eax
call fcn.004b9eb0
mov esi, dword [esp + 0x6a0]
add esp, 4
lea ecx, [esp + 0x6a0]
push ecx
mov ecx, esi
call fcn.00405440
lea ecx, [esp + 0x6a0]
call fcn.00405700
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x68c
ret