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

Disassembly:
sub esp, 0x48
push esi
mov esi, dword [esp + 0x50]
mov eax, dword [esi + 0x78]
test eax, eax
je 0x51da58
mov ecx, dword [esi + 0x2c]
push ebx
push ebp
push edi
lea eax, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esi + 0x2c]
xor eax, eax
mov ecx, 0xb
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov eax, dword [0x621c78]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x6c]
test eax, eax
mov ebp, 0x64
mov dword [esp + 0x2c], 0x2c
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ebp
je 0x51d8b2
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x30]
push ecx
push edx
call eax
push 0x50
push eax
lea edi, [esi + 0xa8]
push edi
call dword [0x5d2618]
add esp, 0xc
mov word [edi + 0x9e], 0
jmp 0x51d8cf
fld dword [esi + 0x1c]
sub esp, 8
fstp qword [esp]
lea edi, [esi + 0xa8]
push str._.2f
push edi
call sym.vidcap60.exe_SfPrintF
add esp, 0x10
mov ecx, dword [esi + 0x78]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x2c]
push eax
push 0
push 0x435
push ecx
call ebx
test eax, eax
jne 0x51d971
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x3c]
push edx
push eax
mov dword [esp + 0x34], 0x2c
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x38], 0x1a0
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esi + 0x78]
lea eax, [esp + 0x2c]
push eax
push 0
push 0x432
push ecx
mov dword [esp + 0x60], edi
call ebx
movzx edx, word [esp + 0x64]
movzx eax, word [esp + 0x60]
mov ecx, dword [esi + 0x78]
shl edx, 0x10
or edx, eax
push edx
push 0
push 0x412
push ecx
mov dword [esi + 0x74], 1
call ebx
mov edx, dword [esi + 0x78]
push 0
push 1
push 0x401
push edx
call ebx
mov ecx, dword [esi + 0x78]
lea eax, [esp + 0x2c]
push eax
push 1
push 0x411
push ecx
jmp 0x51d985
mov eax, dword [esi + 0x78]
lea edx, [esp + 0x2c]
push edx
push 0
push 0x439
mov dword [esp + 0x5c], edi
push eax
call ebx
mov ebp, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x4e
call ebp
push 0x4f
mov dword [esp + 0x28], eax
call ebp
push 0x4d
mov dword [esp + 0x2c], eax
call ebp
push 0x4c
mov dword [esp + 0x60], eax
call ebp
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x5c]
add edx, ecx
add ebp, eax
test edi, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], edx
jne 0x51d9c9
xor eax, eax
jmp 0x51d9d3
push edi
call dword [0x5d2620]
add esp, 4
lea edx, [esp + 0x14]
push edx
push eax
push edi
push 0x64
call sym.vidcap60.exe__SfGetUIFont_4
push eax
call sym.vidcap60.exe__SfGetTextExtent_16
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x60]
add eax, 0x10
lea edx, [eax + ecx]
cmp edx, ebp
mov dword [esp + 0x14], eax
jle 0x51da05
sub ebp, eax
mov ecx, ebp
mov dword [esp + 0x60], ecx
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x28]
lea ebp, [edi + eax]
cmp ebp, edx
jle 0x51da20
sub edx, edi
mov eax, edx
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x10]
cmp ecx, edx
jge 0x51da2e
mov ecx, edx
mov dword [esp + 0x60], ecx
mov edx, dword [esp + 0x5c]
cmp eax, edx
jge 0x51da3c
mov eax, edx
mov dword [esp + 0x64], eax
mov edx, dword [esi + 0x78]
movzx eax, ax
movzx ecx, cx
shl eax, 0x10
or eax, ecx
push eax
push 0
push 0x412
push edx
call ebx
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x48
ret 0xc