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

Disassembly:
sub esp, 0x74
push esi
push edi
mov edi, dword [esp + 0x80]
xor esi, esi
push edi
mov dword [esp + 0x14], esi
call sym.vidcap60.exe__SfGetPixelType_4
cmp eax, 0x10
mov dword [esp + 0xc], eax
jl 0x4a85e8
cmp eax, 0x20
jg 0x4a85e8
mov eax, dword [esp + 0x84]
cmp eax, esi
jne 0x4a83af
push edi
call fcn.00423880
push ebp
mov ebp, dword [esp + 0x90]
cmp ebp, esi
mov dword [esp + 0xc], eax
jne 0x4a83d8
movzx eax, word [edi + 0xe]
imul eax, dword [edi + 4]
add eax, 0x1f
and eax, 0xffffffe0
cdq
and edx, 7
add eax, edx
mov ebp, eax
sar ebp, 3
mov ecx, dword [esp + 0x8c]
mov eax, dword [edi + 4]
push ebx
mov ebx, dword [edi + 8]
xor edx, edx
test ecx, ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ebx
jne 0x4a8411
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebx
jmp 0x4a8498
mov eax, dword [ecx]
mov esi, dword [ecx + 4]
mov ebx, dword [ecx + 8]
test dword [esp + 0xa8], 0x1000000
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ecx
je 0x4a847f
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x2c], eax
mov eax, ebx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x34], eax
mov eax, esi
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x30], eax
mov eax, ecx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0xa8]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
and esi, 0xfeffffff
mov dword [esp + 0xa8], esi
mov esi, dword [esp + 0x28]
sub eax, edx
mov ebx, eax
sub esi, ecx
test ebx, ebx
jle 0x4a85dc
test esi, esi
jle 0x4a85dc
mov eax, dword [esp + 0x14]
cmp eax, 0x17
je 0x4a84dc
cmp eax, 0x18
jne 0x4a84fb
push edi
lea eax, [esp + 0x70]
push eax
call sym.vidcap60.exe__SfDibCreateColorQuantizer_8
test eax, eax
jne 0x4a85d2
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 1
lea ecx, [esp + 0x14]
push ecx
push eax
call sym.vidcap60.exe__SfGetPixelBitsPerChannel_8
mov edx, dword [esp + 0x10]
mov ecx, eax
imul ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x4c], edi
mov edi, dword [edi + 8]
sub edi, eax
imul edi, ebp
mov dword [esp + 0x50], edx
mov eax, ecx
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x10]
sar eax, 3
add edi, edx
add eax, edi
and ecx, 0x80000007
mov dword [esp + 0x54], eax
jns 0x4a8549
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, dword [esp + 0x9c]
lea eax, [esp + 0x1c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x98]
mov dword [esp + 0x78], eax
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0xa8]
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], edx
call fcn.004a50d0
mov esi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4a85d0
mov edi, dword [esp + 0x6c]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebx
pop ebp
pop edi
pop esi
add esp, 0x74
ret 0x24
pop ebx
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x74
ret 0x24
pop edi
mov eax, 0x80004001
pop esi
add esp, 0x74
ret 0x24