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

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x68
cmp eax, 0xffffffff
push esi
mov esi, ecx
je 0x4ca337
cmp eax, dword [esi + 0x17dc8]
jl 0x4ca9b3
cmp eax, dword [esi + 0x17dcc]
jg 0x4ca9b3
push ebx
mov ebx, dword [esp + 0x78]
push ebp
push edi
mov edi, dword [sym.imp.USER32.dll_CopyRect]
lea eax, [esp + 0x58]
push ebx
push eax
call edi
mov ecx, dword [esp + 0x7c]
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x5c]
sub edx, ecx
mov ecx, dword [esp + 0x7c]
mov ebp, eax
mov eax, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x5c]
sub eax, edx
mov dword [esp + 0x20], ebp
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
push ebp
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 0
lea ecx, [esi + 0x24]
mov dword [esp + 0x34], eax
call fcn.004bfb00
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push 1
push ebp
mov dword [esp + 0x34], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esi + 0x142c]
mov edx, dword [esi + 0x1784]
or eax, 0x820
mov dword [esi + 0x1410], eax
mov ecx, dword [edx + 0x50]
test ecx, ecx
jne 0x4ca3d6
or eax, 0x40000
mov dword [esi + 0x1410], eax
lea eax, [esp + 0x58]
mov ecx, esi
push eax
push ebp
call fcn.004cc6c0
mov eax, dword [esi + 0x17dc0]
test eax, eax
je 0x4ca8b5
lea ecx, [esp + 0x48]
push ebx
push ecx
call edi
mov eax, dword [esi + 0x1784]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x4ca416
mov edx, dword [esi + 0x13e0]
mov ecx, dword [esp + 0x50]
sub ecx, edx
mov dword [esp + 0x50], ecx
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x4ca42d
mov eax, dword [esi + 0x177c]
mov ecx, dword [esp + 0x48]
add ecx, eax
mov dword [esp + 0x48], ecx
lea ecx, [esi + 0x16c8]
call fcn.0047a250
test eax, eax
je 0x4ca45d
mov eax, dword [esi + 0x16cc]
mov ecx, dword [esi + 0x1778]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub ecx, eax
mov eax, dword [esp + 0x50]
add eax, ecx
mov dword [esp + 0x50], eax
mov ecx, esi
call fcn.004cd6c0
mov eax, dword [esi + 0x13e4]
mov edx, dword [esp + 0x50]
sub edx, eax
mov dword [esp + 0x50], edx
mov edx, dword [esi + 0x1784]
mov ecx, dword [edx + 0x28]
test ecx, ecx
jne 0x4ca485
add dword [esp + 0x48], eax
mov eax, dword [esi + 0x13e8]
mov ebx, dword [esp + 0x48]
lea ecx, [esp + 0x48]
lea edx, [esp + 0x38]
add ebx, eax
push ecx
push edx
mov dword [esp + 0x50], ebx
call edi
mov eax, dword [esi + 0x1790]
test eax, eax
je 0x4ca4bd
mov eax, dword [esp + 0x44]
mov ecx, dword [esi + 0x1658]
sub eax, ecx
mov dword [esp + 0x3c], eax
jmp 0x4ca4cd
mov ecx, dword [esi + 0x1658]
mov eax, dword [esp + 0x3c]
add ecx, eax
mov dword [esp + 0x44], ecx
lea edx, [esp + 0x38]
lea ebx, [esi + 0x17f48]
push edx
push ebx
call edi
mov edi, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
mov ecx, dword [esi + 0x1784]
sub edi, eax
mov dword [esp + 0x10], 0
mov eax, dword [ecx + 0x44]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x4ca542
mov edx, dword [esi + 0x176c]
mov eax, dword [esi + 0x17f50]
sub eax, edx
mov edx, dword [ebx]
sub eax, edx
mov ebx, dword [esi + 0x176c]
cdq
idiv dword [esi + 0x17dc0]
mov edx, dword [ecx + 0x3c]
add eax, ebx
cmp eax, edx
jae 0x4ca530
mov dword [esp + 0x14], 1
jmp 0x4ca542
lea eax, [esp + 0x38]
mov ecx, esi
push eax
push edi
push ebp
call fcn.004cdbb0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
xor ebx, ebx
test eax, eax
je 0x4ca5e2
mov ecx, dword [esi + 0x176c]
mov ebx, dword [esi + 0x17dc0]
mov ebp, edi
sub ebp, ecx
mov eax, ebp
cdq
idiv ebx
mov ebx, eax
mov eax, dword [esi + 0x1784]
add ebx, ecx
mov edx, dword [eax + 0x38]
cmp ebx, edx
jl 0x4ca578
mov ebx, edx
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x18], ebx
cmp ebx, eax
mov dword [esp + 0x80], eax
jg 0x4ca58c
mov ebx, eax
mov eax, ebx
mov edx, dword [esp + 0x80]
sub eax, ecx
imul eax, dword [esi + 0x17dc0]
add eax, ecx
cmp dword [esp + 0x18], edx
jge 0x4ca5ce
mov ebx, dword [esi + 0x17ddc]
mov eax, ebp
cdq
idiv ebx
mov dword [esi + 0x17e14], 1
mov ebx, eax
add ebx, ecx
mov eax, ebx
sub eax, ecx
imul eax, dword [esi + 0x17ddc]
add eax, ecx
jmp 0x4ca5d8
mov dword [esi + 0x17e14], 0
mov ebp, dword [esp + 0x1c]
sub edi, eax
mov dword [esp + 0x10], edi
mov eax, dword [esi + 0x17dc0]
mov edx, dword [esi + 0x17dc4]
xor edi, edi
lea ecx, [eax - 1]
cmp eax, edi
mov dword [esi + 0x17dcc], ecx
mov ecx, dword [esi + edx*4 + 0x177a8]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edi
jle 0x4ca786
mov ecx, dword [esp + 0x38]
lea edx, [esi + 0x177a8]
mov dword [esp + 0x80], edx
cmp edi, dword [esi + 0x17dc8]
jl 0x4ca71c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4ca63a
lea eax, [ecx + ebx]
jmp 0x4ca655
mov eax, dword [esp + 0x80]
mov eax, dword [eax]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
shl eax, 5
mov eax, dword [eax + esi + 0x18c4]
add eax, ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x40], eax
test ecx, ecx
jle 0x4ca66b
inc eax
dec ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x10], ecx
cmp eax, dword [esp + 0x50]
jg 0x4ca73e
mov edx, dword [esp + 0x80]
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [edx]
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
shl edx, 5
lea eax, [edx + esi + 0x18b4]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
cmp dword [esi + 0x17dc4], edi
jne 0x4ca6bc
lea ecx, [esp + 0x38]
lea edx, [esp + 0x68]
push ecx
push edx
call dword [sym.imp.USER32.dll_CopyRect]
mov dword [esp + 0x18], 1
jmp 0x4ca70c
mov eax, dword [esp + 0x84]
cmp eax, 0xffffffff
jne 0x4ca6db
mov eax, dword [esp + 0x80]
push 1
lea edx, [esp + 0x3c]
mov ecx, dword [eax]
push ecx
push edx
jmp 0x4ca704
cmp edi, eax
je 0x4ca6f3
lea ecx, [eax - 1]
cmp edi, ecx
je 0x4ca6f3
inc eax
cmp edi, eax
je 0x4ca6f3
cmp edi, dword [esi + 0x17dcc]
jne 0x4ca70c
mov edx, dword [esp + 0x80]
push 1
lea ecx, [esp + 0x3c]
mov eax, dword [edx]
push eax
push ecx
push ebp
mov ecx, esi
call fcn.004cac60
mov ecx, dword [esp + 0x40]
mov eax, dword [esi + 0x176c]
sub ecx, eax
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x80]
mov eax, dword [esi + 0x17dc0]
inc edi
add edx, 4
cmp edi, eax
mov dword [esp + 0x80], edx
jl 0x4ca621
jmp 0x4ca76a
lea edx, [edi - 1]
lea eax, [esp + 0x38]
mov dword [esi + 0x17dcc], edx
mov edi, dword [esi + edi*4 + 0x177a8]
push eax
lea ecx, [edi + edi*4]
lea edx, [edi + ecx*2]
shl edx, 5
lea eax, [edx + esi + 0x18b4]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4ca786
mov ecx, dword [esp + 0x1c]
push 1
lea edx, [esp + 0x6c]
push ecx
push edx
push ebp
mov ecx, esi
call fcn.004cac60
lea ecx, [esi + 0x16c8]
call fcn.0047a250
test eax, eax
je 0x4ca867
call dword [sym.imp.USER32.dll_GetMessagePos]
movsx ecx, ax
shr eax, 0x10
movsx edx, ax
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 4]
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], edx
push eax
push ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov eax, dword [esi + 0x16cc]
xor ebx, ebx
cdq
and edx, 3
mov dword [esi + 0x17df4], ebx
add eax, edx
mov edx, dword [esi + 0x176c]
mov edi, eax
mov eax, dword [esi + 0x1778]
sub edx, eax
mov eax, dword [esp + 0x38]
add eax, edx
sar edi, 2
mov dword [esp + 0x38], eax
add eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x17dd0]
cmp eax, 0xffffffff
jne 0x4ca833
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push ecx
lea eax, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x4ca833
mov eax, dword [esi + 0x17df0]
mov dword [esi + 0x17df4], 1
test eax, eax
lea ebx, [edi + edi]
jne 0x4ca833
mov ebx, edi
mov ecx, dword [esi + 0x16d0]
push 0
push 0
push ecx
push edi
push 0
push ebx
lea edx, [esp + 0x50]
push 0
push edx
push ebp
lea ecx, [esi + 0x16c8]
call fcn.004798a0
lea eax, [esp + 0x38]
lea ecx, [esi + 0x1724]
push eax
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
cmp dword [esi + 0x17f58], 0xffffffff
je 0x4ca8b5
lea edx, [esp + 0x38]
lea eax, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esi + 0x17f58]
mov ecx, dword [esi + 0x16e4]
push 0
push 0
push 0
push 0
push 0
add ecx, eax
push 0
lea edx, [esp + 0x34]
push 0
mov dword [esp + 0x40], ecx
push edx
push ebp
lea ecx, [esi + 0x16e0]
mov dword [esp + 0x40], eax
call fcn.004798a0
mov eax, dword [esp + 0x88]
test eax, eax
jne 0x4ca988
mov eax, dword [esp + 0x84]
cmp eax, 0xffffffff
jne 0x4ca904
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
mov edx, dword [esp + 0x7c]
push 0xcc0020
sub eax, ecx
mov ecx, dword [esp + 0x64]
push 0
push 0
push ebp
sub ecx, edi
push eax
push ecx
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
jmp 0x4ca988
mov eax, dword [esi + eax*4 + 0x177a8]
push 0xcc0020
lea ecx, [eax + eax*4]
lea ebx, [eax + eax*4 + 0x5a]
lea edx, [eax + ecx*2]
lea eax, [eax + ebx*2 + 0x12]
shl edx, 5
shl eax, 5
mov edi, dword [edx + esi + 0x18b4]
lea ecx, [edx + esi]
mov eax, dword [eax + esi]
mov ebx, dword [sym.imp.GDI32.dll_BitBlt]
mov edx, dword [ecx + 0x18b8]
mov ecx, dword [ecx + 0x18bc]
push edx
push edi
sub eax, edx
push ebp
sub ecx, edi
push eax
push ecx
push edx
push edi
mov edi, dword [esp + 0x9c]
push edi
call ebx
mov eax, dword [esi + 0x172c]
cmp eax, 0xffffffff
je 0x4ca988
mov ecx, dword [esi + 0x1728]
mov edx, dword [esi + 0x1724]
mov esi, dword [esi + 0x1730]
push 0xcc0020
push ecx
push edx
sub esi, ecx
push ebp
sub eax, edx
push esi
push eax
push ecx
push edx
push edi
call ebx
mov edx, dword [esp + 0x2c]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push ebp
call esi
mov eax, dword [esp + 0x30]
push eax
push ebp
call esi
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x68
ret 0x10