Function at 0x4e1d60
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x68c
lea eax, [esp + 0x694]
push ebx
push esi
push edi
push eax
call fcn.004b8df0
add esp, 4
lea ecx, [esp + 0x6a0]
push 0
push 0x54ebc0
call fcn.00405c70
mov edi, eax
cmp edi, 0xffffffff
je 0x4e2119
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.004e10e0
mov ecx, dword [esp + 0x6ac]
mov esi, eax
add esp, 0xc
mov eax, dword [esi]
cmp ecx, eax
je 0x4e1e18
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x4e1ddf
mov edx, dword [0x546564]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x4e1de6
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4e1df9
mov ecx, dword [eax - 8]
push eax
push ecx
lea ecx, [esp + 0x6a8]
call fcn.00405870
jmp 0x4e1e18
lea ecx, [esp + 0x6a0]
call fcn.00412670
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 [0x546564]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4e1e47
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e1e47
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
lea esi, [edi + 1]
test esi, esi
jl 0x4e2119
mov eax, dword [esp + 0x6a0]
cmp esi, dword [eax - 8]
jg 0x4e2119
lea eax, [eax + esi*2]
push 0x54ebc0
push eax
call fcn.0053176f
add esp, 8
test eax, eax
je 0x4e2119
mov edx, dword [esp + 0x6a0]
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x4e2119
sub eax, edi
mov ecx, esi
dec eax
test ecx, ecx
jge 0x4e1e9a
xor ecx, ecx
test eax, eax
jge 0x4e1ea0
xor eax, eax
mov edx, dword [edx - 8]
lea esi, [ecx + eax]
cmp esi, edx
jle 0x4e1eae
mov eax, edx
sub eax, ecx
cmp ecx, edx
jle 0x4e1eb4
xor eax, eax
mov edx, dword [0x546560]
push 0
push ecx
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x6ac]
push eax
mov dword [esp + 0x1c], edx
call fcn.004126b0
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00405440
lea ecx, [esp + 0xc]
call fcn.00405700
mov edx, dword [0x553d9c]
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 0x4e2110
mov edx, dword [0x546560]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov eax, 0x54ebc0
mov dword [esp + 0xc], edx
test eax, eax
je 0x4e1f84
mov ecx, eax
shr ecx, 0x10
jne 0x4e1f4f
xor edx, edx
lea ecx, [esp + 0xc]
mov dx, ax
push edx
call fcn.00413c90
jmp 0x4e1f84
push 0x54ebc0
call ebx
mov esi, eax
test esi, esi
je 0x4e1f84
push esi
lea ecx, [esp + 0x10]
call fcn.00405530
test eax, eax
je 0x4e1f84
mov edi, dword [esp + 0xc]
lea ecx, [esi + esi]
mov edx, ecx
mov esi, 0x54ebc0
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 [0x546560]
mov ecx, 0x54ebc0
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x4e1fe3
mov edx, ecx
shr edx, 0x10
jne 0x4e1fae
xor eax, eax
mov ax, cx
lea ecx, [esp + 0x10]
push eax
call fcn.00413c90
jmp 0x4e1fe3
push 0x54ebc0
call ebx
mov esi, eax
test esi, esi
je 0x4e1fe3
push esi
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
je 0x4e1fe3
mov edi, dword [esp + 0x10]
lea ecx, [esi + esi]
mov edx, ecx
mov esi, 0x54ebc0
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 [0x546560]
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 [0x546560]
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 [0x546564]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4e2089
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e2089
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e20b8
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e20b8
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
lea ecx, [esp + 0xc]
call fcn.00405700
push 0x546f04
lea ecx, [esp + 0x20]
call fcn.00412740
push eax
lea eax, [esp + 0x30]
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00413060
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.004139f0
lea ecx, [esp + 0x20]
call fcn.00405700
lea ecx, [esp + 0x14]
call fcn.00405700
lea ecx, [esp + 0x18]
call fcn.00405700
push 0
push 0x54cbc0
lea ecx, [esp + 0x6a8]
call fcn.00405c70
test eax, eax
jge 0x4e214b
push 0
push 0x548c28
lea ecx, [esp + 0x6a8]
call fcn.00405c70
test eax, eax
jl 0x4e2219
lea ecx, [esp + 0x6a0]
lea edx, [esp + 0x20]
push ecx
push 0x546f04
push edx
call fcn.004b6ee0
add esp, 4
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00412f10
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.00412dc0
lea ecx, [esp + 0x14]
call fcn.00405700
lea ecx, [esp + 0x20]
call fcn.00405700
lea edx, [esp + 0xc]
push edx
call fcn.004b8df0
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.004140e0
test eax, eax
je 0x4e21f3
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x238]
call fcn.00413e90
push eax
lea ecx, [esp + 0x10]
call fcn.004129b0
lea ecx, [esp + 0x14]
call fcn.00405700
lea edx, [esp + 0xc]
lea ecx, [esp + 0x6a0]
push edx
call fcn.004129b0
lea ecx, [esp + 0x234]
call fcn.004141f0
lea ecx, [esp + 0xc]
call fcn.00405700
lea eax, [esp + 0x6a0]
push eax
call fcn.004b8df0
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