Function at 0x49ef60
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d4eab
mov eax, dword fs:[0]
push eax
sub esp, 0x818
mov eax, dword [0x513b94]
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 0x49efcd
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 0x49efcd
lea ecx, [edi + 8]
call fcn.0049cc10
push 0x24
push edi
call fcn.004a0e51
add esp, 8
cmp byte [esi + 0x14], 0
jne 0x49f235
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 0x5194c8
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x814], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x519458], edi
je 0x49f068
cmp dword [0x519464], edi
je 0x49f068
push 0x12237
call dword [0x51946c]
mov eax, dword [0x519458]
push edi
push edi
push dword [ebp - 0x814]
call eax
cmp dword [0x5194b0], 0
mov edi, eax
je 0x49f068
push 0x400
lea eax, [ebp - 0x810]
push eax
push 0x4f2c34
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x814]
call dword [0x5194b0]
push 0x5194c8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x49f088
push 0x4f2c40
push ebx
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x49f235
cmp byte [esi + 0x14], 0
jne 0x49f235
push 0x34
mov dword [ebp - 0x820], 0
mov dword [ebp - 0x81c], 0
call fcn.004a0e21
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 0x49f1b1
xor ecx, ecx
mov dword [ebp - 0x814], ecx
cmp dword [ecx + edi + 0x20], 0
lea eax, [ecx + edi]
je 0x49f16a
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.0049d6a0
add esp, 0x18
cmp byte [esi + 0x14], 0
mov byte [ebp - 4], 1
jne 0x49f19c
lea ecx, [ebp - 0x818]
call fcn.0049c770
test eax, eax
je 0x49f14d
lea eax, [ebp - 0x818]
push eax
push 2
push ebx
push dword [esi]
call fcn.00464bd0
add esp, 0x10
mov ecx, dword [ebp - 0x818]
mov byte [ebp - 4], 3
test ecx, ecx
je 0x49f160
call fcn.0049c750
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 0x49f1b1
mov ecx, dword [ebp - 0x814]
jmp 0x49f0f4
mov ecx, dword [ebp - 0x818]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x49f20e
call fcn.0049c750
jmp 0x49f20e
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 0x49f1dd
push 0xffff
push 2
push 0x101e
push dword [esi]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x4dd79c
push dword [ebp - 0x824]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov esi, dword [esi + 4]
push 0x5194c8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call dword [0x519468]
push 0x5194c8
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.0042ecb0
push 0x34
push dword [ebp - 0x820]
call fcn.004a0e51
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.004a0e13
mov esp, ebp
pop ebp
ret