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

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x30
push edi
mov edi, eax
mov eax, dword [edx + 0xc]
test al, 0x20
je 0x51f52a
xor eax, eax
pop edi
add esp, 0x30
ret 0xc
test al, 8
push ebx
push ebp
je 0x51f560
mov ebx, dword [esp + 0x44]
mov eax, dword [ebx]
mov ebp, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x38], ebx
mov ebx, dword [edi]
sub eax, 5
add ecx, 5
cmp eax, ebx
jle 0x51f551
mov ebx, eax
mov edi, dword [edi + 8]
cmp ecx, edi
jl 0x51f55a
mov ecx, edi
mov dword [esp + 0x34], ecx
jmp 0x51f58f
mov ecx, dword [esp + 0x44]
mov ebx, dword [ecx]
mov eax, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x34], ebp
mov ebp, dword [edi + 4]
sub eax, 5
add ecx, 5
cmp eax, ebp
jle 0x51f582
mov ebp, eax
mov edi, dword [edi + 0xc]
cmp ecx, edi
jl 0x51f58b
mov ecx, edi
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x34]
mov ecx, dword [edx + 0x7c]
mov edi, dword [esp + 0x38]
sub eax, ebx
mov dword [esp + 0x10], eax
mov eax, dword [edx + 0x78]
mov edx, dword [edx]
mov dword [esp + 0x14], eax
xor eax, eax
and edx, 0xf00
sub edi, ebp
cmp edx, 0x100
setne al
push 6
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], eax
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x28], eax
test byte [ecx + 0xc], 8
push 0xf00021
je 0x51f692
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.GDI32.dll_PatBlt]
push 1
push ecx
lea eax, [edx + ebp - 1]
push eax
push ebx
push esi
call edi
mov edx, dword [esp + 0xc]
lea eax, [edx + edx]
mov ecx, eax
mov eax, dword [esp + 0x38]
sub eax, ecx
sub eax, ebp
cdq
mov ecx, 0xa
idiv ecx
mov ecx, eax
mov eax, edx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0xc]
sar edx, 1
test ecx, ecx
lea eax, [eax + ebp - 1]
lea eax, [eax + edx - 5]
jle 0x51f674
mov dword [esp + 0x1c], ecx
jmp 0x51f650
mov eax, dword [esp + 0x24]
jmp 0x51f650
mov ecx, dword [esp + 0x10]
push 0xf00021
push 1
add eax, 0xa
add ecx, 0xfffffffe
push ecx
push eax
mov dword [esp + 0x34], eax
lea eax, [ebx + 1]
push eax
push esi
call edi
dec dword [esp + 0x1c]
jne 0x51f642
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
push 0xf00021
push 1
sub edx, eax
push ecx
dec edx
push edx
push ebx
jmp 0x51f721
mov eax, dword [esp + 0x18]
push edi
mov edi, dword [sym.imp.GDI32.dll_PatBlt]
push 1
push ebp
lea eax, [ebx + eax - 1]
push eax
push esi
call edi
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
lea edx, [ecx + ecx]
sub eax, edx
sub eax, ebx
cdq
mov ecx, 0xa
idiv ecx
mov ecx, eax
mov eax, edx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0x14]
sar edx, 1
test ecx, ecx
lea eax, [ebx + eax - 1]
lea eax, [eax + edx - 5]
jle 0x51f708
mov dword [esp + 0x1c], ecx
jmp 0x51f6e4
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
push 0xf00021
add ecx, 0xfffffffe
push ecx
push 1
lea ecx, [ebp + 1]
add eax, 0xa
push ecx
push eax
push esi
mov dword [esp + 0x3c], eax
call edi
dec dword [esp + 0x1c]
jne 0x51f6e0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
push 0xf00021
push ecx
mov ecx, dword [esp + 0x1c]
push 1
sub edx, ecx
push ebp
dec edx
push edx
push esi
call edi
push 0x14
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x40]
test byte [eax + 0xc], 8
push 0xf00021
je 0x51f7cd
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push 1
push edx
lea eax, [ecx + ebp]
push eax
push ebx
push esi
mov dword [esp + 0x3c], eax
call edi
mov eax, dword [esp + 0xc]
lea ecx, [eax + eax]
mov eax, dword [esp + 0x38]
sub eax, ecx
sub eax, ebp
cdq
mov ecx, 0xa
idiv ecx
mov ecx, eax
mov eax, edx
cdq
sub eax, edx
mov edx, dword [esp + 0x24]
sar eax, 1
test ecx, ecx
lea ebp, [edx + eax - 5]
jle 0x51f7b0
mov dword [esp + 0x1c], ecx
lea ecx, [ecx]
mov eax, dword [esp + 0x10]
push 0xf00021
push 1
add eax, 0xfffffffe
push eax
add ebp, 0xa
push ebp
lea eax, [ebx + 1]
push eax
push esi
call edi
dec dword [esp + 0x1c]
jne 0x51f790
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0xc]
push 0xf00021
push 1
push eax
mov eax, dword [esp + 0x44]
sub eax, ebp
push eax
push ebx
jmp 0x51f84c
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push edx
push 1
lea eax, [ebx + ecx]
push ebp
push eax
push esi
mov dword [esp + 0x3c], eax
call edi
mov eax, dword [esp + 0x14]
lea ecx, [eax + eax]
mov eax, dword [esp + 0x34]
sub eax, ecx
sub eax, ebx
cdq
mov ecx, 0xa
idiv ecx
mov ecx, eax
mov eax, edx
cdq
sub eax, edx
mov edx, dword [esp + 0x24]
sar eax, 1
test ecx, ecx
lea ebx, [edx + eax - 5]
jle 0x51f834
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x18]
push 0xf00021
add eax, 0xfffffffe
push eax
push 1
lea eax, [ebp + 1]
push eax
add ebx, 0xa
push ebx
push esi
call edi
dec dword [esp + 0x1c]
jne 0x51f814
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
push 0xf00021
push eax
mov eax, dword [esp + 0x3c]
push 1
push ebp
sub eax, edx
push eax
push esi
call edi
mov ecx, dword [esp + 0x48]
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
push ecx
push esi
call ebp
mov edx, dword [esp + 0x40]
test byte [edx + 0xc], 8
mov ebx, dword [esp + 0x44]
push 0xf00021
je 0x51f8a3
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx]
sub ecx, eax
push ecx
push 1
push eax
dec edx
push edx
push esi
call edi
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x51f8d6
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push 0xf00021
sub ecx, eax
push ecx
push 1
push eax
inc edx
push edx
jmp 0x51f8d3
mov eax, dword [ebx]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
push 1
sub ecx, eax
push ecx
dec edx
push edx
push eax
push esi
call edi
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x51f8d6
mov eax, dword [ebx]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
push 0xf00021
push 1
sub ecx, eax
push ecx
inc edx
push edx
push eax
push esi
call edi
mov eax, dword [esp + 0x28]
push eax
push esi
call ebp
pop ebp
pop ebx
mov eax, 1
pop edi
add esp, 0x30
ret 0xc