Function at 0x4e1a50
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x228
lea ecx, [esp + 0x230]
push esi
push edi
push 0
push 0x54ebc0
call fcn.00405c70
mov edi, eax
cmp edi, 0xffffffff
je 0x4e1d24
lea esi, [edi + 1]
test esi, esi
jl 0x4e1d24
mov eax, dword [esp + 0x238]
cmp esi, dword [eax - 8]
jg 0x4e1d24
lea eax, [eax + esi*2]
push 0x54ebc0
push eax
call fcn.0053176f
add esp, 8
test eax, eax
je 0x4e1d24
mov edx, dword [esp + 0x238]
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x4e1d24
sub eax, edi
mov ecx, esi
dec eax
test ecx, ecx
jge 0x4e1ac9
xor ecx, ecx
test eax, eax
jge 0x4e1acf
xor eax, eax
mov edx, dword [edx - 8]
lea esi, [ecx + eax]
cmp esi, edx
jle 0x4e1add
mov eax, edx
sub eax, ecx
cmp ecx, edx
jle 0x4e1ae3
xor eax, eax
mov edx, dword [0x546560]
push 0
push ecx
push eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x244]
push eax
mov dword [esp + 0x18], edx
call fcn.004126b0
lea ecx, [esp + 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405440
lea ecx, [esp + 8]
call fcn.00405700
mov edx, dword [0x553d9c]
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 0x4e1d1b
mov edx, dword [0x546560]
mov eax, 0x54ebc0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
mov dword [esp + 0xc], edx
je 0x4e1bb4
mov ecx, eax
shr ecx, 0x10
jne 0x4e1b7f
xor edx, edx
lea ecx, [esp + 0xc]
mov dx, ax
push edx
call fcn.00413c90
jmp 0x4e1bb4
push 0x54ebc0
call ebx
mov esi, eax
test esi, esi
je 0x4e1bb4
push esi
lea ecx, [esp + 0x10]
call fcn.00405530
test eax, eax
je 0x4e1bb4
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 + 0x14], eax
je 0x4e1c13
mov edx, ecx
shr edx, 0x10
jne 0x4e1bde
xor eax, eax
mov ax, cx
lea ecx, [esp + 0x14]
push eax
call fcn.00413c90
jmp 0x4e1c13
push 0x54ebc0
call ebx
mov esi, eax
test esi, esi
je 0x4e1c13
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x4e1c13
mov edi, dword [esp + 0x14]
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 + 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 [0x546560]
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 [0x546564]
pop ebx
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4e1cba
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e1cba
mov eax, dword [esp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00405700
lea ecx, [esp + 8]
call fcn.00405700
push 0x546f04
lea ecx, [esp + 0x10]
call fcn.00412740
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.00413060
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.004139f0
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