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

Disassembly:
sub esp, 0xb0
push ebp
mov ebp, ecx
mov ecx, dword [ebp + 0x58]
lea eax, [ecx - 5]
test eax, eax
jge 0x42f7a5
xor eax, eax
add ecx, 6
mov dword [esp + 8], eax
cmp eax, ecx
jge 0x42faa4
lea eax, [eax + eax*2 + 0xb1]
push ebx
push esi
push edi
lea eax, [ebp + eax*4]
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
movsx eax, word [eax]
cmp eax, 0x3e8
jl 0x42fa68
cdq
mov esi, 0x3e8
idiv esi
mov dword [esp + 0x10], edx
lea eax, [edx + edx*2]
shl eax, 5
add eax, edx
lea eax, [edx + eax*4]
lea edx, [edx + eax*2]
mov eax, dword [ebp + edx*4 + 0x774]
test eax, eax
lea ebx, [ebp + edx*4]
je 0x42fa68
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x58]
lea ecx, [ecx + eax + 0x19]
mov eax, dword [esp + 0x14]
sub eax, esi
mov dword [esp + 0x24], ecx
lea edx, [eax + eax*8]
mov eax, dword [ebp + 0x1c]
lea eax, [eax + edx*4 + 0x29]
mov dword [esp + 0x28], eax
mov edx, dword [ebx + 0x778]
lea edx, [edx + edx*8]
lea ecx, [ecx + edx*4]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebx + 0x77c]
lea edx, [ecx + ecx*8]
xor ecx, ecx
lea eax, [eax + edx*4]
mov dword [esp + 0x30], eax
mov cx, word [ebx + 0x7a8]
push ecx
mov ecx, 0x5668c4
call fcn.00466130
test eax, eax
je 0x42fa68
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov ecx, dword [0x5668fc]
sub eax, edi
cdq
sub eax, edx
mov esi, eax
movsx eax, word [ecx]
cdq
sub eax, edx
movsx edx, word [ecx + 2]
sar esi, 1
sar eax, 1
sub esi, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x28]
sub eax, edx
add esi, edi
cdq
sub eax, edx
mov edi, eax
mov eax, dword [esp + 0x20]
cdq
movsx ecx, word [ecx]
sub eax, edx
add ecx, esi
sar edi, 1
sar eax, 1
sub edi, eax
mov eax, dword [esp + 0x28]
add edi, eax
mov eax, dword [esp + 0x20]
add eax, edi
lea edx, [esp + 0x34]
push eax
push ecx
push edi
push esi
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [ebp + 0x1c]
mov edx, dword [esp + 0x38]
lea ecx, [eax + 0x29]
cmp edx, ecx
jge 0x42f8dc
mov edx, ecx
lea ecx, [eax + 0x101]
mov eax, dword [esp + 0x40]
cmp eax, ecx
jle 0x42f8ec
mov eax, ecx
mov ecx, dword [esp + 0x34]
sub eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x3c]
sub ecx, esi
sub eax, esi
mov dword [esp + 0x34], ecx
mov cl, byte [ebx + 0x7a2]
sub edx, edi
mov dword [esp + 0x3c], eax
cmp cl, 0xa
mov dword [esp + 0x38], edx
mov eax, 0xffff
je 0x42f921
cmp cl, 0xb
jne 0x42f947
xor eax, eax
xor ecx, ecx
mov ah, byte [ebx + 0x7c7]
mov cl, byte [ebx + 0x7c5]
mov al, byte [ebx + 0x7c6]
shl eax, 8
or eax, ecx
mov ecx, 0x8ab7a8
push eax
call fcn.0045e4e0
mov edx, dword [0x566900]
push 0xffff
push eax
lea eax, [esp + 0x3c]
push edx
push eax
push edi
push esi
mov ecx, 0x8ab7a8
call fcn.0045f2d0
mov eax, dword [ebp + 0x2375c]
test eax, eax
je 0x42fa68
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0x23768]
cmp ecx, eax
jne 0x42fa68
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
lea edx, [eax + 0x101]
add eax, 0x29
push edx
lea edx, [ecx + 0xf1]
push edx
push eax
add ecx, 0x19
lea eax, [esp + 0x78]
push ecx
push eax
call dword [sym.imp.USER32.dll_SetRect]
lea ecx, [esp + 0x24]
lea edx, [esp + 0x6c]
push ecx
lea eax, [esp + 0x48]
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x42fa68
fild dword [esp + 0x44]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
sub ecx, edx
mov edx, dword [esp + 0x50]
fstp dword [esp + 0x60]
fild dword [esp + 0x48]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x48]
sub edx, ecx
push 0x3f800000
fstp dword [esp + 0x68]
fild dword [esp + 0x14]
mov dword [esp + 0x14], edx
push 0x3f48c8c9
push 0x3ec8c8c9
lea eax, [esp + 0x88]
fstp dword [esp + 0x60]
fild dword [esp + 0x1c]
push 0x3e48c8c9
push eax
mov dword [esp + 0x7c], 0
mov dword [esp + 0x70], 0x3f800000
fstp dword [esp + 0x6c]
call fcn.00466800
add esp, 0x14
lea ecx, [esp + 0x7c]
lea edx, [esp + 0x54]
lea eax, [esp + 0x60]
push 0
push 0
push ecx
mov ecx, dword [0x8ab7bc]
push edx
push eax
push ecx
mov ecx, 0x5600fc
mov dword [esp + 0xa0], 0x3b808081
call fcn.004542f0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add ecx, 0x24
add eax, 2
cmp ecx, 0xd8
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
jl 0x42f7cc
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 0x58]
inc ecx
add edx, 6
cmp ecx, edx
mov dword [esp + 0x14], ecx
jl 0x42f7c2
pop edi
pop esi
pop ebx
pop ebp
add esp, 0xb0
ret