Function at 0x4a2600
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8e0b
mov eax, dword fs:[0]
push eax
sub esp, 0x818
mov eax, dword [0x517ba0]
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 esi, dword [ebp + 8]
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x4a266d
push 0xffffffffffffffff
push dword [edi + 0x18]
mov byte [edi + 0x14], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
lock xadd dword [edi + 0x20], eax
jne 0x4a266d
lea ecx, [edi + 8]
call fcn.004a0250
push 0x24
push edi
call fcn.004a4471
add esp, 8
cmp byte [esi + 0x14], 0
jne 0x4a28d5
push 0x42f
push dword [esi]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
xor edi, edi
mov eax, dword [esi + 4]
push 0x51d520
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x814], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x51d4b0], edi
je 0x4a2708
cmp dword [0x51d4bc], edi
je 0x4a2708
push 0x12237
call dword [0x51d4c4]
mov eax, dword [0x51d4b0]
push edi
push edi
push dword [ebp - 0x814]
call eax
cmp dword [0x51d508], 0
mov edi, eax
je 0x4a2708
push 0x400
lea eax, [ebp - 0x810]
push eax
push 0x4f6c50
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x814]
call dword [0x51d508]
push 0x51d520
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x4a2728
push 0x4f6c60
push ebx
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x4a28d5
cmp byte [esi + 0x14], 0
jne 0x4a28d5
push 0x34
mov dword [ebp - 0x820], 0
mov dword [ebp - 0x81c], 0
call fcn.004a4441
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 - 0x820], eax
mov ecx, dword [esi + 0xc]
mov eax, 0x66666667
mov edi, dword [esi + 8]
xor ebx, ebx
sub ecx, edi
mov dword [ebp - 4], 0
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4a2851
xor ecx, ecx
mov dword [ebp - 0x814], ecx
cmp dword [ecx + edi + 0x20], 0
lea eax, [ecx + edi]
je 0x4a280a
push 0
push dword [ebp - 0x824]
lea ecx, [ebp - 0x820]
push ecx
push eax
push dword [esi + 4]
lea eax, [ebp - 0x818]
push eax
call fcn.004a0d60
add esp, 0x18
cmp byte [esi + 0x14], 0
mov byte [ebp - 4], 1
jne 0x4a283c
lea ecx, [ebp - 0x818]
call fcn.0049fdc0
test eax, eax
je 0x4a27ed
lea eax, [ebp - 0x818]
push eax
push 2
push ebx
push dword [esi]
call fcn.004675a0
add esp, 0x10
mov ecx, dword [ebp - 0x818]
mov byte [ebp - 4], 3
test ecx, ecx
je 0x4a2800
call fcn.0049fda0
mov ecx, dword [ebp - 0x814]
mov byte [ebp - 4], 0
mov edi, dword [esi + 8]
add ecx, 0x28
mov dword [ebp - 0x814], ecx
mov eax, 0x66666667
mov ecx, dword [esi + 0xc]
inc ebx
sub ecx, edi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x4a2851
mov ecx, dword [ebp - 0x814]
jmp 0x4a2794
mov ecx, dword [ebp - 0x818]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x4a28ae
call fcn.0049fda0
jmp 0x4a28ae
mov ecx, dword [esi + 0xc]
mov eax, 0x66666667
sub ecx, edi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4a287d
push 0xffff
push 2
push 0x101e
push dword [esi]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x4e1a9c
push dword [ebp - 0x824]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov esi, dword [esi + 4]
push 0x51d520
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call dword [0x51d4c0]
push 0x51d520
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x820]
push dword [eax + 4]
lea eax, [ebp - 0x820]
push eax
mov ecx, eax
call fcn.0042fd20
push 0x34
push dword [ebp - 0x820]
call fcn.004a4471
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.004a4433
mov esp, ebp
pop ebp
ret