Function at 0x47d7b0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dfc68
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x527f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x52dc48], 0
jne 0x47d7eb
push 0
call fcn.0047c2c0
add esp, 4
mov edi, dword [ebp + 8]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jl 0x47da0f
push 0x5093b8
push eax
call fcn.004bbc71
add esp, 8
test eax, eax
je 0x47da0f
mov ecx, dword [edi]
sub eax, ecx
sar eax, 1
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x47da0f
lea esi, [eax + 2]
mov eax, dword [ecx - 0xc]
test esi, esi
jl 0x47da0f
cmp esi, eax
jg 0x47da0f
lea eax, [ecx + esi*2]
push 0x5093b8
push eax
call fcn.004bbc71
add esp, 8
test eax, eax
je 0x47da0f
sub eax, dword [edi]
sar eax, 1
cmp eax, 0xffffffff
je 0x47da0f
mov ebx, eax
sub ebx, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
lea ecx, [ebx - 2]
push ecx
push esi
push edx
mov ecx, edi
call fcn.0042b938
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x47d9e9
call fcn.004ad3ae
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x47daca
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov ecx, 0x4eea54
mov byte [ebp - 4], 1
test ecx, 0xffff0000
jne 0x47d8d6
mov edx, ecx
movzx edi, dx
push edi
call fcn.004b5332
test eax, eax
je 0x47d8f4
push edi
push eax
lea ecx, [ebp - 0x10]
call fcn.00424e5c
jmp 0x47d8f1
push 0x4eea54
call fcn.004bbaea
add esp, 4
push eax
push 0x4eea54
lea ecx, [ebp - 0x10]
call fcn.004253df
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], 2
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x514
or eax, ecx
jge 0x47d91c
push 0x514
lea ecx, [ebp - 0x10]
call fcn.0042251a
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
push 0x514
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004bbacb
add esp, 8
test eax, eax
jl 0x47dad4
cmp eax, dword [esi - 8]
jg 0x47dad4
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test edi, edi
je 0x47d9c6
cmp dword [esi - 0xc], ecx
je 0x47d9c6
mov edi, dword [ebp + 8]
lea eax, [ebx + 2]
mov ebx, dword [ebp - 0x18]
push ebx
push edi
call fcn.0042488e
push esi
push edi
mov eax, ebx
call fcn.0043d807
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x47d997
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47d7eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x47d7eb
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47d9e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47da0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jle 0x47da7b
push 0x25
push eax
call fcn.004bc598
add esp, 8
test eax, eax
je 0x47da7b
sub eax, dword [edi]
sar eax, 1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x47da7b
mov dword [ebp - 0x10], 0
mov esi, 0x52a1f8
lea ecx, [ecx]
mov edx, dword [esi]
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x47da47
sub eax, edi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
sar eax, 1
push eax
push edx
lea ecx, [ecx + ebx*2]
push ecx
call fcn.004be056
add esp, 0xc
test eax, eax
je 0x47da8d
inc dword [ebp - 0x10]
add esi, 0x10
cmp esi, 0x52a448
jl 0x47da40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x10]
shl esi, 4
mov eax, dword [esi + 0x52a1f8]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x47daa0
sub eax, edx
push ebx
sar eax, 1
push edi
call fcn.0042488e
mov edx, dword [esi + 0x52a204]
push edx
push edi
mov eax, ebx
call fcn.0043d807
jmp 0x47d7eb
push 0x80004005
call fcn.00422000
push 0x80070057
call fcn.00422000
int3