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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x70]
push ebp
test eax, eax
push esi
mov dword [esp + 0xc], ecx
je 0x4a9814
cdq
xor eax, edx
sub eax, edx
cmp eax, 4
jg 0x4a9814
cmp dword [esp + 0x80], 2
jl 0x4a9814
mov eax, dword [esp + 0x70]
mov ebp, dword [esp + 0x6c]
mov esi, dword [sym.imp.GDI32.dll_LPtoDP]
push 2
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x20], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x30], edx
call esi
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
sub edx, ecx
test edx, edx
jle 0x4a9814
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
sub eax, edx
test eax, eax
jle 0x4a9814
mov eax, dword [esp + 0x74]
test eax, eax
je 0x4a963b
mov ecx, dword [eax]
push 2
mov dword [esp + 0x4c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x50], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x54], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x4c]
push eax
push ecx
mov dword [esp + 0x60], edx
call esi
mov edx, dword [ebp]
push ebx
push edi
mov ecx, ebp
call dword [edx + 0x1c]
mov eax, dword [ebp]
push 1
mov ecx, ebp
call dword [eax + 0x34]
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
sub edx, esi
sub ecx, edi
xor ebx, ebx
mov dword [esp + 0x78], ecx
test edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 1
jle 0x4a97f3
mov edi, dword [sym.imp.USER32.dll_OffsetRect]
mov eax, edx
mov dword [esp + 0x10], 0x32
sub eax, ebx
cmp eax, 0x32
jg 0x4a9698
mov dword [esp + 0x10], eax
xor eax, eax
test ecx, ecx
jle 0x4a97da
mov edx, dword [esp + 0x10]
lea ebp, [edx + ebx]
jmp 0x4a96af
mov ecx, dword [esp + 0x78]
sub ecx, eax
cmp ecx, 0x32
jle 0x4a96bb
mov ecx, 0x32
lea esi, [ecx + eax]
push ebp
push esi
push ebx
push eax
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ecx
lea eax, [esp + 0x34]
push edx
push eax
call edi
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x4a96fb
lea ecx, [esp + 0x50]
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x34]
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x4a97c4
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x4c], edx
neg eax
neg ecx
push eax
lea edx, [esp + 0x44]
push ecx
push edx
call edi
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x24]
sub eax, ecx
mov ecx, dword [esp + 0x2c]
sub ecx, edx
lea edx, [esp + 0x60]
push edx
mov edx, dword [esp + 0x8c]
push edx
mov edx, dword [esp + 0x8c]
push edx
push ecx
mov ecx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x94]
push eax
call fcn.004a8b60
cmp eax, 1
jne 0x4a97e7
mov ecx, dword [esp + 0x8c]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x78]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x24]
call fcn.004a9400
mov ecx, dword [esp + 0x78]
mov eax, esi
cmp eax, ecx
jl 0x4a96ab
mov ebp, dword [esp + 0x74]
mov edx, dword [esp + 0x1c]
add ebx, dword [esp + 0x10]
cmp ebx, edx
jge 0x4a97f3
jmp 0x4a9683
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x14]
call fcn.004a8760
mov edx, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
call dword [edx + 0x20]
mov eax, dword [esp + 0x18]
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x60
ret 0x1c
pop esi
xor eax, eax
pop ebp
add esp, 0x60
ret 0x1c