Function at 0x4a5340
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4daa9b
mov eax, dword fs:[0]
push eax
sub esp, 0x818
mov eax, dword [0x517b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x1c]
test esi, esi
je 0x4a53ad
push 0xffffffffffffffff
push dword [esi + 0x18]
mov byte [esi + 0x14], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
lock xadd dword [esi + 0x20], eax
jne 0x4a53ad
lea ecx, [esi + 8]
call fcn.004a2ee0
push 0x24
push esi
call fcn.004a71e8
add esp, 8
cmp byte [edi + 0x14], 0
jne 0x4a5665
push 0x42f
push dword [edi]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
xor esi, esi
mov eax, dword [edi + 4]
push 0x52edcc
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x820], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x52ed58], esi
je 0x4a5475
cmp dword [0x52ed64], esi
je 0x4a5475
mov esi, dword [0x52ed6c]
mov ecx, esi
push 0x12237
call dword [0x4dc8a4]
call esi
mov esi, dword [0x52ed58]
mov ecx, esi
push 0
push 0
push dword [ebp - 0x820]
call dword [0x4dc8a4]
call esi
cmp dword [0x52edb0], 0
mov dword [ebp - 0x814], eax
je 0x4a546f
push 0x400
lea eax, [ebp - 0x810]
push eax
push 0x4f9b90
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, dword [0x52edb0]
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x820]
mov ecx, esi
call dword [0x4dc8a4]
call esi
mov esi, dword [ebp - 0x814]
push 0x52edcc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x4a5495
push 0x4f9ba0
push ebx
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x4a5665
cmp byte [edi + 0x14], 0
jne 0x4a5665
xorps xmm0, xmm0
movlpd qword [ebp - 0x81c], xmm0
push 0x34
mov dword [ebp - 0x81c], 0
mov dword [ebp - 0x818], 0
call fcn.004a71b8
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x81c], eax
mov ecx, dword [edi + 0xc]
mov eax, 0x66666667
mov esi, dword [edi + 8]
xor ebx, ebx
sub ecx, esi
mov dword [ebp - 4], 0
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4a55d7
xor ecx, ecx
mov dword [ebp - 0x820], ecx
nop dword [eax]
cmp dword [ecx + esi + 0x20], 0
lea eax, [ecx + esi]
je 0x4a5590
push 0
push dword [ebp - 0x824]
lea ecx, [ebp - 0x81c]
mov dword [ebp - 0x814], 0
push ecx
push eax
push dword [edi + 4]
lea eax, [ebp - 0x814]
push eax
call fcn.004a3a20
add esp, 0x18
cmp byte [edi + 0x14], 0
mov byte [ebp - 4], 1
jne 0x4a55c2
lea ecx, [ebp - 0x814]
call fcn.004a2a40
test eax, eax
je 0x4a5573
lea eax, [ebp - 0x814]
push eax
push 2
push ebx
push dword [edi]
call fcn.00469da0
add esp, 0x10
mov ecx, dword [ebp - 0x814]
mov byte [ebp - 4], 3
test ecx, ecx
je 0x4a5586
call fcn.004a2a20
mov ecx, dword [ebp - 0x820]
mov byte [ebp - 4], 0
mov esi, dword [edi + 8]
add ecx, 0x28
mov dword [ebp - 0x820], ecx
mov eax, 0x66666667
mov ecx, dword [edi + 0xc]
inc ebx
sub ecx, esi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x4a55d7
mov ecx, dword [ebp - 0x820]
jmp 0x4a5510
mov ecx, dword [ebp - 0x814]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x4a563e
call fcn.004a2a20
jmp 0x4a563e
mov ecx, dword [edi + 0xc]
mov eax, 0x66666667
sub ecx, esi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4a5603
push 0xffff
push 2
push 0x101e
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x4e454c
push dword [ebp - 0x824]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov esi, dword [edi + 4]
push 0x52edcc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov esi, dword [0x52ed68]
mov ecx, esi
call dword [0x4dc8a4]
call esi
push 0x52edcc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x81c]
push dword [eax + 4]
lea eax, [ebp - 0x81c]
push eax
mov ecx, eax
call fcn.0042ba80
push 0x34
push dword [ebp - 0x81c]
call fcn.004a71e8
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a71aa
mov esp, ebp
pop ebp
ret