Function at 0x49bffb
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x94
cmp dword [esp + 0x9c], 0
mov eax, ecx
push ebx
push ebp
push esi
mov ebx, edx
mov dword [esp + 0x24], eax
push edi
mov dword [esp + 0x1c], ebx
jge 0x49c3a1
cmp dword [0x4cdc58], 0
jne 0x49c3a1
cmp byte [eax + 0x6a], 0
jne 0x49c3a1
mov byte [eax + 0x6a], 1
lea eax, [esp + 0x48]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
push eax
push ebx
call dword [sym.imp.USER32.dll_ScreenToClient]
lea eax, [esp + 0x70]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClientRect]
mov esi, dword [esp + 0xa8]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 2
push esi
push 0x317
push ebx
call edi
lea eax, [esp + 0x3c]
push eax
push esi
call dword [sym.imp.GDI32.dll_GetViewportOrgEx]
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x78]
sub eax, dword [esp + 0x48]
add eax, dword [esp + 0x50]
mov ebp, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
cdq
sub eax, edx
mov dword [esp + 0x2c], ecx
mov ebx, eax
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x7c]
sub eax, dword [esp + 0x4c]
add eax, dword [esp + 0x54]
cdq
sub eax, edx
sar ebx, 1
sar eax, 1
add ebx, ecx
push 0
add ebp, eax
mov dword [esp + 0x24], ebx
push ebp
push ebx
mov ebx, dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push esi
mov dword [esp + 0x34], ebp
call ebx
push 0
push esi
push 0xf
push dword [esp + 0x28]
call edi
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 0x2c]
mov eax, dword [eax + 0x24]
mov ebp, dword [eax + 0x34]
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x49c38c
lea esp, [esp]
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 0
push 0x51c920
mov eax, dword [ecx]
push ecx
call dword [eax]
test eax, eax
jns 0x49c293
mov dword [esp + 0x18], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 0x64]
mov eax, dword [eax + 0x80]
mov ebx, dword [eax + 0x3c]
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x49c377
push ebx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x49c377
lea eax, [esp + 0x80]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x80]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_ScreenToClient]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push ebx
call ebp
mov eax, dword [esp + 0x88]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x2c]
push eax
push ebx
call ebp
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x90]
push eax
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_GetClientRect]
push 2
lea eax, [esp + 0x94]
push eax
push dword [esp + 0x24]
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov eax, dword [esp + 0x24]
add edi, eax
add ebp, dword [esp + 0x20]
add eax, ebx
push eax
mov eax, dword [esp + 0x48]
add eax, dword [esp + 0x24]
push eax
push edi
push ebp
call dword [sym.imp.GDI32.dll_CreateRectRgn]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectClipRgn]
push 0
push edi
push ebp
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
mov ebx, dword [esp + 0x10]
push 0xffffffffffffffe0
push ebx
call dword [sym.imp.USER32.dll_GetClassWord]
movzx ecx, ax
mov ax, word [0x4cdc54]
test ax, ax
je 0x49c246
cmp cx, ax
je 0x49c26e
mov ax, word [0x4cdc50]
test ax, ax
je 0x49c256
cmp cx, ax
je 0x49c26e
mov ax, word [0x4cdc4c]
test ax, ax
je 0x49c314
cmp cx, ax
jne 0x49c314
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push esi
push 0x14
push ebx
call edi
push SysReAllocStringLen
push esi
push 0x318
push ebx
call edi
mov ebp, dword [esp + 0x20]
jmp 0x49c358
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x49c135
xor eax, eax
mov dword [esp + 0x10], 0
lea edx, [esp + 0x14]
mov dword [esp + 0x60], eax
push edx
lea edx, [esp + 0x64]
mov dword [esp + 0x68], eax
push edx
mov dword [esp + 0x70], eax
lea edx, [esp + 0x18]
mov dword [esp + 0x74], eax
mov dword [esp + 0x1c], eax
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x20]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x49c308
cmp word [esp + 0x14], 0
je 0x49c302
mov eax, dword [ecx]
lea edx, [esp + 0x60]
push 0
push 0
push 0
push edx
push esi
push 0
push 0
push 0
push 0xffffffffffffffff
push 1
push ecx
call dword [eax + 0xc]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x49c37d
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 2
push esi
push 0x317
push ebx
call edi
mov eax, dword [esp + 0x94]
add eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
push 0
push eax
mov eax, dword [esp + 0x98]
add eax, ebp
push eax
push esi
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push 0
push esi
push 0x14
push ebx
call edi
push 0
push esi
push 0xf
push ebx
call edi
mov ebx, dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push 0
push dword [esp + 0x28]
push ebp
push esi
call ebx
push 0
push esi
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov ebp, dword [esp + 0x14]
jmp 0x49c37d
mov ebx, dword [sym.imp.GDI32.dll_SetViewportOrgEx]
mov ebp, dword [ebp + 4]
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x49c10b
push 0
push dword [esp + 0x44]
push dword [esp + 0x44]
push esi
call ebx
mov eax, dword [esp + 0x28]
mov byte [eax + 0x6a], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret