Function at 0x4d5b40
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 0x4d5b67
cmp eax, dword [esi + 0x18ba4]
jl 0x4d64b8
cmp eax, dword [esi + 0x18ba8]
jg 0x4d64b8
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.004de1a0
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 + 0x1eb4]
mov ecx, dword [esi + 0x215c]
or eax, 0x820
mov dword [esi + 0x1e98], eax
mov edx, dword [ecx + 0x50]
test edx, edx
jne 0x4d5c2a
or eax, 0x40000
mov dword [esi + 0x1e98], eax
lea edx, [esp + 0x64]
mov ecx, esi
push edx
push ebp
call fcn.004d8710
mov eax, dword [esi + 0x18b9c]
test eax, eax
je 0x4d637d
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 + 0x215c]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x4d5c77
mov edx, dword [esi + 0x1e68]
mov ecx, dword [esp + 0x5c]
sub ecx, edx
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x4d5c8e
mov eax, dword [esi + 0x2150]
mov ecx, dword [esp + 0x54]
add ecx, eax
mov dword [esp + 0x54], ecx
mov ecx, dword [esi + 0x20d8]
test ecx, ecx
je 0x4d5cc9
call fcn.004843f0
test eax, eax
je 0x4d5cc9
mov ecx, dword [esi + 0x20d8]
call fcn.004844b0
mov eax, dword [eax]
mov ecx, dword [esi + 0x214c]
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.004d98e0
mov eax, dword [esi + 0x1e6c]
mov edx, dword [esp + 0x5c]
sub edx, eax
mov dword [esp + 0x5c], edx
mov edx, dword [esi + 0x215c]
mov ecx, dword [edx + 0x28]
test ecx, ecx
jne 0x4d5cf1
add dword [esp + 0x54], eax
mov eax, dword [esi + 0x1e70]
mov ecx, dword [esp + 0x54]
add ecx, eax
xor edi, edi
mov dword [esp + 0x54], ecx
mov ecx, dword [esi + 0x20c4]
test ecx, ecx
je 0x4d5d15
call fcn.004844b0
mov edi, dword [eax + 4]
lea ecx, [esp + 0x54]
lea edx, [esp + 0x44]
push ecx
push edx
call ebx
mov eax, dword [esi + 0x2168]
test eax, eax
je 0x4d5d37
mov eax, dword [esp + 0x50]
sub eax, edi
mov dword [esp + 0x48], eax
jmp 0x4d5d41
mov ecx, dword [esp + 0x48]
add ecx, edi
mov dword [esp + 0x50], ecx
lea edx, [esp + 0x44]
lea edi, [esi + 0x18d24]
push edx
push edi
call ebx
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x54]
mov ecx, dword [esi + 0x215c]
sub ebx, eax
mov dword [esp + 0x14], 0
mov eax, dword [ecx + 0x44]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4d5db6
mov edx, dword [esi + 0x2140]
mov eax, dword [esi + 0x18d2c]
sub eax, edx
mov edx, dword [edi]
sub eax, edx
mov edi, dword [esi + 0x2140]
cdq
idiv dword [esi + 0x18b9c]
mov edx, dword [ecx + 0x3c]
add eax, edi
cmp eax, edx
jae 0x4d5da4
mov dword [esp + 0x18], 1
jmp 0x4d5db6
lea eax, [esp + 0x44]
mov ecx, esi
push eax
push ebx
push ebp
call fcn.004d9df0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, edi
mov dword [esi + 0x18d54], edi
mov dword [esi + 0x18d58], edi
je 0x4d6066
mov ecx, dword [esi + 0x2140]
mov edi, dword [esi + 0x18b9c]
mov ebp, ebx
sub ebp, ecx
mov eax, ebp
cdq
idiv edi
mov edx, dword [esi + 0x215c]
mov edx, dword [edx + 0x38]
add eax, ecx
cmp eax, edx
jl 0x4d5df6
mov eax, edx
mov edx, dword [esi + 0x215c]
mov dword [esp + 0x14], eax
mov edx, dword [edx + 0x3c]
cmp eax, edx
jg 0x4d5e09
mov eax, edx
cmp dword [esp + 0x14], edx
jge 0x4d5e26
mov eax, ebp
mov dword [esi + 0x18bf0], 1
cdq
idiv dword [esi + 0x18bb8]
add eax, ecx
jmp 0x4d5e30
mov dword [esi + 0x18bf0], 0
mov ebp, dword [esi + 0x18ba4]
sub eax, ecx
sub edi, ebp
imul eax, edi
add eax, ecx
xor ecx, ecx
cmp ebx, eax
setl cl
xor eax, eax
mov dword [esi + 0x18d58], ecx
test ebp, ebp
setne al
test eax, eax
mov dword [esi + 0x18d54], eax
je 0x4d5e6d
mov edx, dword [esi + 0x2154]
mov eax, dword [esp + 0x54]
add eax, edx
mov dword [esp + 0x54], eax
test ecx, ecx
je 0x4d5e89
mov eax, dword [esi + 0x2154]
mov edx, dword [esi + 0x214c]
mov ecx, dword [esp + 0x5c]
add eax, edx
sub ecx, eax
mov dword [esp + 0x5c], ecx
mov edi, dword [sym.imp.USER32.dll_CopyRect]
lea ecx, [esp + 0x54]
lea edx, [esp + 0x44]
push ecx
push edx
call edi
lea eax, [esp + 0x54]
push eax
lea eax, [esi + 0x18d24]
push eax
call edi
mov eax, dword [esi + 0x18d54]
test eax, eax
je 0x4d5f2a
mov eax, dword [esi + 0x2154]
mov ecx, dword [esp + 0x54]
mov ebp, dword [esi + 0x2140]
sub ecx, eax
add eax, ebp
mov dword [esp + 0x44], ecx
add eax, ecx
lea ecx, [esp + 0x44]
lea edx, [esi + 0x18d34]
push ecx
push edx
mov dword [esp + 0x54], eax
call edi
mov eax, dword [esi + 0x18bd0]
mov ebx, 1
test eax, eax
jne 0x4d5f16
mov eax, dword [esi + 0x18bc8]
test eax, eax
jne 0x4d5f16
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 0x4d5f16
mov ebx, 4
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x48]
push ebx
push eax
push ecx
mov ecx, esi
call fcn.004d6df0
mov eax, dword [esi + 0x18d58]
test eax, eax
je 0x4d5fac
mov ecx, dword [esi + 0x2154]
mov edx, dword [esp + 0x5c]
mov ebp, dword [esi + 0x2140]
lea eax, [ecx + edx]
mov dword [esp + 0x4c], eax
sub eax, ecx
sub eax, ebp
lea ecx, [esi + 0x18d44]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x44]
push eax
push ecx
call edi
mov eax, dword [esi + 0x18bd0]
mov edi, 1
test eax, eax
jne 0x4d5f98
mov eax, dword [esi + 0x18bc8]
test eax, eax
jne 0x4d5f98
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
push edx
lea ecx, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x4d5f98
mov edi, 4
mov eax, dword [esp + 0x10]
push 1
lea edx, [esp + 0x48]
push edi
push edx
push eax
mov ecx, esi
call fcn.004d6df0
lea ecx, [esp + 0x54]
lea edx, [esp + 0x44]
push ecx
push edx
call dword [sym.imp.USER32.dll_CopyRect]
mov ebx, dword [esp + 0x4c]
mov edi, dword [esp + 0x44]
mov ecx, dword [esi + 0x2140]
sub ebx, edi
mov edi, dword [esi + 0x18b9c]
mov ebp, ebx
sub ebp, ecx
mov eax, ebp
cdq
idiv edi
mov edi, eax
mov eax, dword [esi + 0x215c]
add edi, ecx
mov edx, dword [eax + 0x38]
cmp edi, edx
jl 0x4d5fee
mov edi, edx
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x14], edi
cmp edi, eax
mov dword [esp + 0x1c], eax
jg 0x4d5fff
mov edi, eax
mov eax, edi
mov edx, dword [esp + 0x1c]
sub eax, ecx
imul eax, dword [esi + 0x18b9c]
add eax, ecx
cmp dword [esp + 0x14], edx
jge 0x4d604c
mov edi, dword [esi + 0x18bb8]
mov eax, ebp
cdq
idiv edi
mov edx, dword [esp + 0x44]
mov ebp, dword [esp + 0x10]
mov dword [esi + 0x18bf0], 1
mov edi, eax
add edi, ecx
mov eax, edi
sub eax, ecx
imul eax, dword [esi + 0x18bb8]
add eax, ecx
sub ebx, eax
mov dword [esp + 0x14], ebx
jmp 0x4d606a
mov edx, dword [esp + 0x44]
mov ebp, dword [esp + 0x10]
sub ebx, eax
mov dword [esi + 0x18bf0], 0
mov dword [esp + 0x14], ebx
jmp 0x4d606a
mov edx, dword [esp + 0x44]
mov eax, dword [esi + 0x18b9c]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x1c], ebx
lea ecx, [eax - 1]
mov dword [esi + 0x18ba8], ecx
mov ecx, dword [esi + 0x18ba0]
mov ecx, dword [esi + ecx*4 + 0x18584]
mov dword [esp + 0x20], ecx
jle 0x4d61f8
lea eax, [esi + 0x18584]
mov dword [esp + 0x10], eax
cmp ebx, dword [esi + 0x18ba4]
jl 0x4d6193
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4d60bb
lea eax, [edx + edi]
jmp 0x4d60d4
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*8]
shl ecx, 1
sub ecx, eax
mov eax, dword [esi + ecx*4 + 0x22a0]
add eax, edx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x4c], eax
test ecx, ecx
jle 0x4d60ea
inc eax
dec ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], ecx
cmp eax, dword [esp + 0x5c]
jg 0x4d61af
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x44]
push edx
mov eax, dword [eax]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*8]
shl ecx, 1
sub ecx, eax
lea edx, [esi + ecx*4 + 0x2290]
push edx
call dword [sym.imp.USER32.dll_CopyRect]
cmp dword [esi + 0x18ba0], ebx
jne 0x4d6139
lea eax, [esp + 0x44]
lea ecx, [esp + 0x74]
push eax
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov dword [esp + 0x1c], 1
jmp 0x4d6183
mov eax, dword [esp + 0x90]
cmp eax, 0xffffffff
jne 0x4d6155
mov edx, dword [esp + 0x10]
push 1
lea ecx, [esp + 0x48]
mov eax, dword [edx]
push eax
push ecx
jmp 0x4d617b
cmp ebx, eax
je 0x4d616d
lea edx, [eax - 1]
cmp ebx, edx
je 0x4d616d
inc eax
cmp ebx, eax
je 0x4d616d
cmp ebx, dword [esi + 0x18ba8]
jne 0x4d6183
mov eax, dword [esp + 0x10]
push 1
lea edx, [esp + 0x48]
mov ecx, dword [eax]
push ecx
push edx
push ebp
mov ecx, esi
call fcn.004d67d0
mov edx, dword [esp + 0x4c]
mov eax, dword [esi + 0x2140]
sub edx, eax
mov dword [esp + 0x44], edx
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x18b9c]
inc ebx
add ecx, 4
cmp ebx, eax
mov dword [esp + 0x10], ecx
jl 0x4d60a2
jmp 0x4d61dc
lea eax, [ebx - 1]
lea ecx, [esp + 0x44]
mov dword [esi + 0x18ba8], eax
mov ebx, dword [esi + ebx*4 + 0x18584]
push ecx
lea eax, [ebx + ebx*4]
lea edx, [eax + eax*8]
shl edx, 1
sub edx, ebx
lea eax, [esi + edx*4 + 0x2290]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4d61f8
mov ecx, dword [esp + 0x20]
push 1
lea edx, [esp + 0x78]
push ecx
push edx
push ebp
mov ecx, esi
call fcn.004d67d0
mov ecx, dword [esi + 0x20d8]
test ecx, ecx
je 0x4d631a
call fcn.004843f0
test eax, eax
je 0x4d631a
mov ecx, dword [esi + 0x20d8]
xor ebx, ebx
call fcn.004844b0
mov ecx, eax
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ecx, dword [esi + 0x1e6c]
mov dword [esp + 0x24], edx
cdq
and edx, 3
add eax, edx
mov edx, dword [esi + 0x215c]
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 0x4d6259
sub eax, dword [esi + 0x1e68]
mov edx, dword [esi + 0x18d58]
test edx, edx
je 0x4d626f
mov dword [esp + 0x4c], eax
sub eax, edi
mov dword [esp + 0x44], eax
jmp 0x4d62a1
mov edx, dword [esi + 0x2140]
sub edx, dword [esi + 0x214c]
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 0x4d62a1
sub eax, ecx
push 0
push eax
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esi + 0x18bac]
mov dword [esi + 0x18bd0], 0
cmp eax, 0xffffffff
jne 0x4d62e8
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 0x4d62e8
mov eax, dword [esi + 0x18bcc]
mov dword [esi + 0x18bd0], 1
test eax, eax
lea ebx, [edi + edi]
jne 0x4d62e8
mov ebx, edi
mov ecx, dword [esp + 0x24]
push 0
push 0
push ecx
mov ecx, dword [esi + 0x20d8]
push edi
push 0
push ebx
lea edx, [esp + 0x5c]
push 0
push edx
push ebp
call fcn.00483a00
lea eax, [esp + 0x44]
lea ecx, [esi + 0x20f8]
push eax
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esi + 0x20dc]
test eax, eax
je 0x4d637d
cmp dword [esi + 0x18d5c], 0xffffffff
je 0x4d637d
lea edx, [esp + 0x44]
lea eax, [esp + 0x20]
push edx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov ecx, dword [esi + 0x18d5c]
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 0x20dc]
call fcn.004844b0
mov edx, dword [eax]
mov ebx, dword [esp + 0x20]
push 0
mov ecx, dword [esi + 0x20dc]
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.00483a00
mov eax, dword [esp + 0x94]
test eax, eax
jne 0x4d6459
cmp dword [esp + 0x90], 0xffffffff
jne 0x4d63cd
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 0x4d6459
mov ecx, dword [esp + 0x90]
push 0xcc0020
mov eax, dword [esi + ecx*4 + 0x18584]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*8]
shl edx, 1
sub edx, eax
mov ecx, dword [esi + edx*4 + 0x2294]
mov edi, dword [esi + edx*4 + 0x229c]
lea eax, [esi + edx*4]
push ecx
sub edi, ecx
mov edx, dword [eax + 0x2290]
mov eax, dword [eax + 0x2298]
push edx
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 + 0x2100]
cmp eax, 0xffffffff
je 0x4d6459
mov ecx, dword [esi + 0x20fc]
mov edx, dword [esi + 0x20f8]
mov ebx, dword [esi + 0x2104]
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 + 0x18b9c]
mov edx, dword [esi + 0x18ba8]
dec eax
xor ecx, ecx
cmp edx, eax
mov eax, dword [esi + 0x18ba4]
setne cl
xor edx, edx
mov dword [esi + 0x18d58], ecx
test eax, eax
setne dl
mov ecx, esi
mov dword [esi + 0x18d54], edx
call fcn.004db360
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x74
ret 0x10