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

Disassembly:
sub esp, 0x7c
push edi
mov edi, dword [esp + 0x84]
test byte [edi + 0xc], 0x81
jne 0x520fec
mov eax, dword [edi + 0x24]
test eax, eax
mov dword [esp + 0x3c], 0
jbe 0x520fe0
push ebx
mov ebx, dword [sym.imp.GDI32.dll_PatBlt]
push ebp
push esi
mov esi, dword [esp + 0x94]
add edi, 0xbc
mov edi, edi
mov edx, dword [edi]
mov eax, dword [edi + 8]
mov ecx, dword [edi - 4]
sub eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 4]
sub eax, ecx
lea ebp, [edi - 4]
mov dword [esp + 0x44], eax
mov eax, ebp
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x54], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x5c], eax
mov eax, dword [ecx + 0x88]
mov ecx, dword [ecx + 0x84]
neg ecx
sub edx, ecx
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x58]
add edx, ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x54]
neg eax
sub edx, eax
add ecx, eax
push 0xf
mov dword [esp + 0x58], edx
mov dword [esp + 0x60], ecx
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
lea ecx, [esp + 0x54]
push ecx
push esi
call dword [sym.imp.USER32.dll_FillRect]
push 6
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [edi]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x44]
push 0xf00021
add eax, 0xfffffffe
push 1
push eax
mov dword [esp + 0x30], eax
mov eax, dword [ebp]
push edx
inc eax
push eax
push esi
call ebx
mov ecx, dword [esp + 0x24]
mov edx, dword [edi + 8]
mov eax, dword [ebp]
push 0xf00021
push 1
push ecx
dec edx
push edx
inc eax
push eax
push esi
call ebx
mov eax, dword [esp + 0x3c]
mov ecx, dword [edi]
mov edx, dword [ebp]
add eax, 0xfffffffe
push 0xf00021
push eax
push 1
inc ecx
mov dword [esp + 0x20], eax
push ecx
push edx
push esi
call ebx
mov eax, dword [esp + 0x14]
mov ecx, dword [edi]
mov edx, dword [edi + 4]
push 0xf00021
push eax
push 1
inc ecx
push ecx
dec edx
push edx
push esi
call ebx
mov eax, dword [esp + 0x90]
mov ecx, dword [eax + 0xc]
test ch, 4
push 0x10
je 0x520f30
call dword [sym.imp.USER32.dll_GetSysColor]
push 0xf
mov dword [esp + 0x1c], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push 0x14
mov dword [esp + 0x14], eax
call dword [sym.imp.USER32.dll_GetSysColor]
mov ecx, dword [esp + 0x18]
mov dl, cl
shr dl, 1
mov byte [esp + 0x2a], dl
mov dx, cx
shr ecx, 0x10
mov dword [esp + 0x38], ecx
shr cl, 1
mov byte [esp + 0x29], cl
movzx ecx, al
add ecx, 0xff
sar ecx, 1
mov byte [esp + 0x2d], cl
movzx ecx, ah
shr eax, 0x10
movzx eax, al
add eax, 0xff
sar eax, 1
shr dx, 8
mov byte [esp + 0x2c], al
mov eax, dword [esp + 0x10]
add ecx, 0xff
mov word [esp + 0x20], dx
shr dl, 1
sar ecx, 1
shr eax, 0x10
push 6
mov byte [esp + 0x32], dl
mov byte [esp + 0x33], cl
mov byte [esp + 0x2f], al
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x24]
mov edx, dword [edi]
push 0xf00021
push 1
mov dword [esp + 0x48], eax
mov eax, dword [ebp]
push ecx
push edx
inc eax
push eax
push esi
call ebx
mov ecx, dword [esp + 0x24]
mov edx, dword [edi + 8]
mov eax, dword [ebp]
push 0xf00021
push 1
push ecx
dec edx
push edx
inc eax
push eax
push esi
call ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
mov eax, dword [ebp]
push 0xf00021
push ecx
push 1
inc edx
push edx
push eax
push esi
call ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
push 0xf00021
push ecx
push 1
mov eax, dword [edi + 4]
inc edx
push edx
dec eax
push eax
push esi
call ebx
push 0
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
push esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
add eax, 0xfffffffe
mov dword [esp + 0x34], 0
je 0x520ec6
test eax, eax
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
jge 0x520c4b
fadd dword [0x5eab28]
mov ecx, dword [esp + 0x10]
fstp dword [esp + 0x7c]
movzx eax, byte [esp + 0x2a]
movzx edx, cl
sub edx, eax
mov dword [esp + 0x10], edx
movzx edx, byte [esp + 0x2b]
fild dword [esp + 0x10]
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + 0x2e]
fstp dword [esp + 0x80]
fild dword [esp + 0x1c]
movzx ecx, ch
fstp dword [esp + 0x88]
sub ecx, eax
mov dword [esp + 0x10], ecx
movzx ecx, byte [esp + 0x2d]
fild dword [esp + 0x10]
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + 0x29]
fstp dword [esp + 0x84]
fild dword [esp + 0x1c]
sub edx, eax
mov dword [esp + 0x10], edx
movzx edx, byte [esp + 0x2f]
fstp dword [esp + 0x6c]
fild dword [esp + 0x10]
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + 0x18]
fstp dword [esp + 0x60]
fild dword [esp + 0x1c]
sub ecx, eax
mov dword [esp + 0x10], ecx
movzx ecx, byte [esp + 0x2c]
fstp dword [esp + 0x74]
fild dword [esp + 0x10]
mov dword [esp + 0x18], eax
movzx eax, byte [esp + 0x20]
fstp dword [esp + 0x64]
fild dword [esp + 0x18]
sub edx, eax
mov dword [esp + 0x10], edx
fstp dword [esp + 0x68]
mov dword [esp + 0x18], eax
movzx eax, byte [esp + 0x38]
fild dword [esp + 0x10]
sub ecx, eax
fstp dword [esp + 0x70]
mov dword [esp + 0x38], ecx
fild dword [esp + 0x18]
mov dword [esp + 0x10], eax
fstp dword [esp + 0x78]
fild dword [esp + 0x38]
fstp dword [esp + 0x38]
fild dword [esp + 0x10]
fstp dword [esp + 0x4c]
mov edx, dword [esp + 0x34]
fild dword [esp + 0x34]
test edx, edx
jge 0x520d42
fadd dword [0x5eab28]
fdiv dword [esp + 0x7c]
fsubr dword [0x5e971c]
fstp dword [esp + 0x20]
fld dword [esp + 0x80]
fmul dword [esp + 0x20]
fadd dword [esp + 0x88]
call fcn.005c4484
fld dword [esp + 0x84]
fmul dword [esp + 0x20]
mov dword [esp + 0x10], eax
fadd dword [esp + 0x6c]
call fcn.005c4484
fld dword [esp + 0x60]
fmul dword [esp + 0x20]
mov dword [esp + 0x18], eax
fadd dword [esp + 0x74]
call fcn.005c4484
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
movzx eax, byte [esp + 0x10]
xor edx, edx
mov dh, byte [esp + 0x1c]
mov dl, byte [esp + 0x18]
shl edx, 8
or edx, eax
push edx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
push esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x24]
mov edx, dword [edi]
push 0xf00021
push 1
push ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x40]
lea ecx, [edx + eax + 1]
mov edx, dword [ebp]
push ecx
inc edx
push edx
push esi
call ebx
fld dword [esp + 0x64]
fmul dword [esp + 0x20]
fadd dword [esp + 0x68]
call fcn.005c4484
fld dword [esp + 0x70]
fmul dword [esp + 0x20]
mov dword [esp + 0x10], eax
fadd dword [esp + 0x78]
call fcn.005c4484
fld dword [esp + 0x38]
fmul dword [esp + 0x20]
mov dword [esp + 0x18], eax
fadd dword [esp + 0x4c]
call fcn.005c4484
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
movzx eax, byte [esp + 0x10]
xor edx, edx
mov dh, byte [esp + 0x1c]
mov dl, byte [esp + 0x18]
shl edx, 8
or edx, eax
push edx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
push esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
cmp eax, 1
jb 0x520eb2
mov ecx, dword [esp + 0x3c]
add ecx, 0xfffffffd
cmp eax, ecx
jae 0x520eb2
mov ecx, dword [esp + 0x44]
mov edx, dword [edi]
push 0xf00021
push 1
add ecx, 0xfffffffc
push ecx
mov ecx, dword [ebp]
lea eax, [edx + eax + 1]
push eax
add ecx, 2
push ecx
push esi
call ebx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x3c]
inc eax
add ecx, 0xfffffffe
cmp eax, ecx
mov dword [esp + 0x34], eax
jb 0x520d30
push 0x14
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x3c]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp]
push 0xf00021
add edx, 0xfffffffd
push edx
push 1
inc eax
push eax
inc ecx
push ecx
push esi
call ebx
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp]
push 0xf00021
push 1
push edx
inc eax
push eax
inc ecx
push ecx
push esi
call ebx
mov edx, dword [esp + 0x30]
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push esi
call ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x40]
push ecx
push esi
call ebp
jmp 0x520fb7
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x14]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
push 0xf00021
push edx
push 1
inc eax
push eax
sub ecx, 2
push ecx
push esi
call ebx
mov edx, dword [esp + 0x24]
mov eax, dword [edi + 8]
mov ecx, dword [ebp]
push 0xf00021
push 1
push edx
sub eax, 2
push eax
inc ecx
push ecx
push esi
call ebx
push 0x14
call sym.vidcap60.exe__SfGetUIBrush_4
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x14]
mov eax, dword [edi]
mov ecx, dword [ebp]
push 0xf00021
push edx
push 1
inc eax
push eax
inc ecx
push ecx
push esi
call ebx
mov edx, dword [esp + 0x24]
mov eax, dword [edi]
mov ecx, dword [ebp]
push 0xf00021
push 1
push edx
inc eax
push eax
inc ecx
push ecx
push esi
call ebx
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x40]
push edx
push esi
call ebp
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x90]
mov edx, dword [ecx + 0x24]
inc eax
add edi, 0x24
cmp eax, edx
mov dword [esp + 0x48], eax
jb 0x520a00
pop esi
pop ebp
pop ebx
mov eax, 1
pop edi
add esp, 0x7c
ret 8
xor eax, eax
pop edi
add esp, 0x7c
ret 8