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

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x74
cmp eax, 0xffffffff
push esi
mov esi, ecx
je 0x4be487
cmp eax, dword [esi + 0x17ba4]
jl 0x4bedd2
cmp eax, dword [esi + 0x17ba8]
jg 0x4bedd2
push ebx
push ebp
push edi
call dword [sym.imp.USER32.dll_GetMessagePos]
movsx ecx, ax
shr eax, 0x10
movsx edx, ax
mov dword [esp + 0x3c], ecx
mov ecx, dword [esi + 4]
lea eax, [esp + 0x3c]
mov dword [esp + 0x40], edx
push eax
push ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov edx, dword [esp + 0x8c]
lea eax, [esp + 0x64]
push edx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov edi, dword [esp + 0x88]
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [esp + 0x70]
mov ebx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov ebp, eax
mov eax, dword [esp + 0x64]
sub ecx, ebx
sub edx, eax
push ecx
push edx
push edi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ebp
mov dword [esp + 0x40], eax
call edi
push 0
lea ecx, [esi + 0x24]
mov dword [esp + 0x38], eax
call fcn.004c6620
push eax
push ebp
call edi
push 1
push ebp
mov dword [esp + 0x38], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esi + 0x12b4]
mov ecx, dword [esi + 0x155c]
or eax, 0x820
mov dword [esi + 0x1298], eax
mov edx, dword [ecx + 0x50]
test edx, edx
jne 0x4be54a
or eax, 0x40000
mov dword [esi + 0x1298], eax
lea edx, [esp + 0x64]
mov ecx, esi
push edx
push ebp
call fcn.004c0e60
mov eax, dword [esi + 0x17b9c]
test eax, eax
je 0x4bec9b
mov eax, dword [esp + 0x8c]
mov ebx, dword [sym.imp.USER32.dll_CopyRect]
lea ecx, [esp + 0x54]
push eax
push ecx
call ebx
mov eax, dword [esi + 0x155c]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x4be597
mov edx, dword [esi + 0x1268]
mov ecx, dword [esp + 0x5c]
sub ecx, edx
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x4be5ae
mov eax, dword [esi + 0x1550]
mov ecx, dword [esp + 0x54]
add ecx, eax
mov dword [esp + 0x54], ecx
mov ecx, dword [esi + 0x14d8]
test ecx, ecx
je 0x4be5e9
call fcn.00477ff0
test eax, eax
je 0x4be5e9
mov ecx, dword [esi + 0x14d8]
call fcn.00478010
mov eax, dword [eax]
mov ecx, dword [esi + 0x154c]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub ecx, eax
mov eax, dword [esp + 0x5c]
add eax, ecx
mov dword [esp + 0x5c], eax
mov ecx, esi
call fcn.004c1fb0
mov eax, dword [esi + 0x126c]
mov edx, dword [esp + 0x5c]
sub edx, eax
mov dword [esp + 0x5c], edx
mov edx, dword [esi + 0x155c]
mov ecx, dword [edx + 0x28]
test ecx, ecx
jne 0x4be611
add dword [esp + 0x54], eax
mov eax, dword [esi + 0x1270]
mov ecx, dword [esp + 0x54]
add ecx, eax
xor edi, edi
mov dword [esp + 0x54], ecx
mov ecx, dword [esi + 0x14c4]
test ecx, ecx
je 0x4be635
call fcn.00478010
mov edi, dword [eax + 4]
lea ecx, [esp + 0x54]
lea edx, [esp + 0x44]
push ecx
push edx
call ebx
mov eax, dword [esi + 0x1568]
test eax, eax
je 0x4be657
mov eax, dword [esp + 0x50]
sub eax, edi
mov dword [esp + 0x48], eax
jmp 0x4be661
mov ecx, dword [esp + 0x48]
add ecx, edi
mov dword [esp + 0x50], ecx
lea edx, [esp + 0x44]
lea edi, [esi + 0x17d24]
push edx
push edi
call ebx
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x54]
mov ecx, dword [esi + 0x155c]
sub ebx, eax
mov dword [esp + 0x14], 0
mov eax, dword [ecx + 0x44]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4be6d6
mov edx, dword [esi + 0x1540]
mov eax, dword [esi + 0x17d2c]
sub eax, edx
mov edx, dword [edi]
sub eax, edx
mov edi, dword [esi + 0x1540]
cdq
idiv dword [esi + 0x17b9c]
mov edx, dword [ecx + 0x3c]
add eax, edi
cmp eax, edx
jae 0x4be6c4
mov dword [esp + 0x18], 1
jmp 0x4be6d6
lea eax, [esp + 0x44]
mov ecx, esi
push eax
push ebx
push ebp
call fcn.004c24d0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, edi
mov dword [esi + 0x17d54], edi
mov dword [esi + 0x17d58], edi
je 0x4be987
mov edi, dword [esi + 0x1540]
mov ecx, dword [esi + 0x17b9c]
mov ebp, ebx
sub ebp, edi
mov eax, ebp
cdq
idiv ecx
mov edx, dword [esi + 0x155c]
mov edx, dword [edx + 0x38]
add eax, edi
cmp eax, edx
jl 0x4be716
mov eax, edx
mov edx, dword [esi + 0x155c]
mov dword [esp + 0x14], eax
mov edx, dword [edx + 0x3c]
cmp eax, edx
jg 0x4be729
mov eax, edx
cmp dword [esp + 0x14], edx
jge 0x4be746
mov eax, ebp
mov dword [esi + 0x17bf0], 1
cdq
idiv dword [esi + 0x17bb8]
add eax, edi
jmp 0x4be750
mov dword [esi + 0x17bf0], 0
mov ebp, dword [esi + 0x17ba4]
sub eax, edi
sub ecx, ebp
xor edx, edx
imul ecx, eax
add ecx, edi
cmp ebx, ecx
setl dl
xor eax, eax
mov ecx, edx
test ebp, ebp
setne al
test eax, eax
mov dword [esi + 0x17d58], ecx
mov dword [esi + 0x17d54], eax
je 0x4be78f
mov eax, dword [esi + 0x1554]
mov edx, dword [esp + 0x54]
add edx, eax
mov dword [esp + 0x54], edx
test ecx, ecx
je 0x4be7ab
mov ecx, dword [esi + 0x1554]
mov edx, dword [esi + 0x154c]
mov eax, dword [esp + 0x5c]
add ecx, edx
sub eax, ecx
mov dword [esp + 0x5c], eax
mov edi, dword [sym.imp.USER32.dll_CopyRect]
lea edx, [esp + 0x54]
lea eax, [esp + 0x44]
push edx
push eax
call edi
lea ecx, [esp + 0x54]
lea eax, [esi + 0x17d24]
push ecx
push eax
call edi
mov eax, dword [esi + 0x17d54]
test eax, eax
je 0x4be84c
mov eax, dword [esi + 0x1554]
mov ecx, dword [esp + 0x54]
mov edx, dword [esi + 0x1540]
sub ecx, eax
add eax, edx
lea edx, [esp + 0x44]
add eax, ecx
push edx
mov dword [esp + 0x50], eax
lea eax, [esi + 0x17d34]
push eax
mov dword [esp + 0x4c], ecx
call edi
mov eax, dword [esi + 0x17bd0]
mov ebx, 1
test eax, eax
jne 0x4be838
mov eax, dword [esi + 0x17bc8]
test eax, eax
jne 0x4be838
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push ecx
lea eax, [esp + 0x48]
push edx
push eax
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x4be838
mov ebx, 4
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x48]
push ebx
push ecx
push edx
mov ecx, esi
call fcn.004bf6c0
mov eax, dword [esi + 0x17d58]
test eax, eax
je 0x4be8cd
mov ecx, dword [esi + 0x1554]
mov eax, dword [esp + 0x5c]
mov ebx, dword [esi + 0x1540]
add eax, ecx
mov dword [esp + 0x4c], eax
sub eax, ecx
lea ecx, [esp + 0x44]
lea edx, [esi + 0x17d44]
sub eax, ebx
push ecx
push edx
mov dword [esp + 0x4c], eax
call edi
mov eax, dword [esi + 0x17bd0]
mov edi, 1
test eax, eax
jne 0x4be8b9
mov eax, dword [esi + 0x17bc8]
test eax, eax
jne 0x4be8b9
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
push eax
lea edx, [esp + 0x48]
push ecx
push edx
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x4be8b9
mov edi, 4
mov ecx, dword [esp + 0x10]
push 1
lea eax, [esp + 0x48]
push edi
push eax
push ecx
mov ecx, esi
call fcn.004bf6c0
lea edx, [esp + 0x54]
lea eax, [esp + 0x44]
push edx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov ebx, dword [esp + 0x4c]
mov edi, dword [esp + 0x44]
mov ecx, dword [esi + 0x1540]
sub ebx, edi
mov edi, dword [esi + 0x17b9c]
mov ebp, ebx
sub ebp, ecx
mov eax, ebp
cdq
idiv edi
mov edi, eax
mov eax, dword [esi + 0x155c]
add edi, ecx
mov edx, dword [eax + 0x38]
cmp edi, edx
jl 0x4be90f
mov edi, edx
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x14], edi
cmp edi, eax
mov dword [esp + 0x1c], eax
jg 0x4be920
mov edi, eax
mov eax, edi
mov edx, dword [esp + 0x1c]
sub eax, ecx
imul eax, dword [esi + 0x17b9c]
add eax, ecx
cmp dword [esp + 0x14], edx
jge 0x4be96d
mov edi, dword [esi + 0x17bb8]
mov eax, ebp
cdq
idiv edi
mov ebp, dword [esp + 0x10]
mov dword [esi + 0x17bf0], 1
mov edi, eax
add edi, ecx
mov eax, edi
sub eax, ecx
imul eax, dword [esi + 0x17bb8]
add eax, ecx
mov ecx, dword [esp + 0x44]
sub ebx, eax
mov dword [esp + 0x14], ebx
jmp 0x4be98b
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 0x10]
sub ebx, eax
mov dword [esi + 0x17bf0], 0
mov dword [esp + 0x14], ebx
jmp 0x4be98b
mov ecx, dword [esp + 0x44]
mov eax, dword [esi + 0x17b9c]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x1c], ebx
lea edx, [eax - 1]
mov dword [esi + 0x17ba8], edx
mov edx, dword [esi + 0x17ba0]
mov edx, dword [esi + edx*4 + 0x17584]
mov dword [esp + 0x20], edx
jle 0x4beb16
lea eax, [esi + 0x17584]
mov dword [esp + 0x10], eax
cmp ebx, dword [esi + 0x17ba4]
jl 0x4beab2
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4be9dc
lea eax, [ecx + edi]
jmp 0x4be9f4
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
shl eax, 5
mov eax, dword [eax + esi + 0x16a0]
add eax, ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x4c], eax
test ecx, ecx
jle 0x4bea0a
inc eax
dec ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], ecx
cmp eax, dword [esp + 0x5c]
jg 0x4beace
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x44]
push ecx
mov eax, dword [edx]
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
shl edx, 5
lea eax, [edx + esi + 0x1690]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
cmp dword [esi + 0x17ba0], ebx
jne 0x4bea58
lea ecx, [esp + 0x44]
lea edx, [esp + 0x74]
push ecx
push edx
call dword [sym.imp.USER32.dll_CopyRect]
mov dword [esp + 0x1c], 1
jmp 0x4beaa2
mov eax, dword [esp + 0x90]
cmp eax, 0xffffffff
jne 0x4bea74
mov eax, dword [esp + 0x10]
push 1
lea edx, [esp + 0x48]
mov ecx, dword [eax]
push ecx
push edx
jmp 0x4bea9a
cmp ebx, eax
je 0x4bea8c
lea ecx, [eax - 1]
cmp ebx, ecx
je 0x4bea8c
inc eax
cmp ebx, eax
je 0x4bea8c
cmp ebx, dword [esi + 0x17ba8]
jne 0x4beaa2
mov edx, dword [esp + 0x10]
push 1
lea ecx, [esp + 0x48]
mov eax, dword [edx]
push eax
push ecx
push ebp
mov ecx, esi
call fcn.004bf0c0
mov ecx, dword [esp + 0x4c]
mov eax, dword [esi + 0x1540]
sub ecx, eax
mov dword [esp + 0x44], ecx
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x17b9c]
inc ebx
add edx, 4
cmp ebx, eax
mov dword [esp + 0x10], edx
jl 0x4be9c3
jmp 0x4beafa
lea edx, [ebx - 1]
lea eax, [esp + 0x44]
mov dword [esi + 0x17ba8], edx
mov ebx, dword [esi + ebx*4 + 0x17584]
push eax
lea ecx, [ebx + ebx*4]
lea edx, [ebx + ecx*2]
shl edx, 5
lea eax, [edx + esi + 0x1690]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4beb16
mov ecx, dword [esp + 0x20]
push 1
lea edx, [esp + 0x78]
push ecx
push edx
push ebp
mov ecx, esi
call fcn.004bf0c0
mov ecx, dword [esi + 0x14d8]
test ecx, ecx
je 0x4bec38
call fcn.00477ff0
test eax, eax
je 0x4bec38
mov ecx, dword [esi + 0x14d8]
xor ebx, ebx
call fcn.00478010
mov ecx, eax
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ecx, dword [esi + 0x126c]
mov dword [esp + 0x24], edx
cdq
and edx, 3
add eax, edx
mov edx, dword [esi + 0x155c]
mov edi, eax
mov eax, dword [esp + 0x8c]
sar edi, 2
mov eax, dword [eax + 8]
sub eax, ecx
cmp dword [edx + 0x24], ebx
je 0x4beb77
sub eax, dword [esi + 0x1268]
mov edx, dword [esi + 0x17d58]
test edx, edx
je 0x4beb8d
mov dword [esp + 0x4c], eax
sub eax, edi
mov dword [esp + 0x44], eax
jmp 0x4bebbf
mov edx, dword [esi + 0x1540]
sub edx, dword [esi + 0x154c]
add edx, ecx
mov ecx, dword [esp + 0x44]
add ecx, edx
mov dword [esp + 0x44], ecx
add ecx, edi
cmp ecx, eax
mov dword [esp + 0x4c], ecx
jle 0x4bebbf
sub eax, ecx
push 0
push eax
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esi + 0x17bac]
mov dword [esi + 0x17bd0], 0
cmp eax, 0xffffffff
jne 0x4bec06
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push ecx
lea eax, [esp + 0x48]
push edx
push eax
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x4bec06
mov eax, dword [esi + 0x17bcc]
mov dword [esi + 0x17bd0], 1
test eax, eax
lea ebx, [edi + edi]
jne 0x4bec06
mov ebx, edi
mov ecx, dword [esp + 0x24]
push 0
push 0
push ecx
mov ecx, dword [esi + 0x14d8]
push edi
push 0
push ebx
lea edx, [esp + 0x5c]
push 0
push edx
push ebp
call fcn.004775e0
lea eax, [esp + 0x44]
lea ecx, [esi + 0x14f8]
push eax
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esi + 0x14dc]
test eax, eax
je 0x4bec9b
cmp dword [esi + 0x17d5c], 0xffffffff
je 0x4bec9b
lea edx, [esp + 0x44]
lea eax, [esp + 0x20]
push edx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov ecx, dword [esi + 0x17d5c]
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 0x14dc]
call fcn.00478010
mov edx, dword [eax]
mov ebx, dword [esp + 0x20]
push 0
mov ecx, dword [esi + 0x14dc]
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x38]
push 0
add edx, ebx
push eax
push ebp
mov dword [esp + 0x4c], edx
call fcn.004775e0
mov eax, dword [esp + 0x94]
test eax, eax
jne 0x4bed73
cmp dword [esp + 0x90], 0xffffffff
jne 0x4beceb
mov ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x64]
push 0xcc0020
push 0
push 0
sub ecx, edi
push ebp
sub edx, eax
mov eax, dword [esp + 0x98]
push ecx
push edx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
jmp 0x4bed73
mov ecx, dword [esp + 0x90]
push 0xcc0020
mov eax, dword [esi + ecx*4 + 0x17584]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
shl eax, 5
add eax, esi
mov ecx, dword [eax + 0x1694]
mov edx, dword [eax + 0x1690]
mov edi, dword [eax + 0x169c]
mov eax, dword [eax + 0x1698]
push ecx
push edx
sub edi, ecx
push ebp
sub eax, edx
push edi
mov edi, dword [sym.imp.GDI32.dll_BitBlt]
push eax
push ecx
mov ecx, dword [esp + 0xa4]
push edx
push ecx
call edi
mov eax, dword [esi + 0x1500]
cmp eax, 0xffffffff
je 0x4bed73
mov ecx, dword [esi + 0x14fc]
mov edx, dword [esi + 0x14f8]
mov ebx, dword [esi + 0x1504]
push 0xcc0020
push ecx
push edx
sub ebx, ecx
push ebp
sub eax, edx
push ebx
push eax
push ecx
push edx
mov edx, dword [esp + 0xa8]
push edx
call edi
mov eax, dword [esp + 0x30]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ebp
call edi
mov ecx, dword [esp + 0x34]
push ecx
push ebp
call edi
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esi + 0x17b9c]
mov edx, dword [esi + 0x17ba8]
dec eax
xor ecx, ecx
cmp edx, eax
mov eax, dword [esi + 0x17ba4]
setne cl
xor edx, edx
mov dword [esi + 0x17d58], ecx
test eax, eax
setne dl
mov ecx, esi
mov dword [esi + 0x17d54], edx
call fcn.004c3a10
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x74
ret 0x10