Function at 0x505140
Capabilities:
Capture webcam image

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [0x62e040]
xor eax, esp
mov dword [esp + 0x260], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x1c], edi
mov eax, dword [edi + 0xc]
sub eax, 1
je 0x5054f3
sub eax, 0x10000
jne 0x5054da
push 1
push dword [edi + 0x10]
mov dword [esp + 0x30], 0x20
mov dword [esp + 0x34], 0x2d
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
push 0
push dword [edi + 0x24]
mov dword [esp + 0x20], 0
push 0x419
push dword [edi]
mov dword [esp + 0x24], 0
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x447
push dword [edi]
mov esi, eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push dword [edi + 0x24]
mov dword [esp + 0x18], eax
push 0x40b
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push dword [edi + 0x24]
push 0x409
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x28]
push eax
push dword [edi + 0x24]
push 0x43f
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 0xffffffff
je 0x5054da
mov al, byte [esp + 0x39]
lea ebx, [edi + 0x14]
shr al, 7
mov byte [esp + 0xf], al
mov eax, dword [edi + 0x10]
push 0xffffff
push eax
cmp dword [esp + 0x18], esi
jne 0x505270
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0x808080
push dword [edi + 0x10]
call dword [sym.imp.GDI32.dll_SetDCBrushColor]
push 0x12
call dword [sym.imp.GDI32.dll_GetStockObject]
jmp 0x5052a9
mov bl, byte [esp + 0x40]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword ds:[edi + 0x10]
test bl, 2
jne 0x505292
push dword [0x635060]
lea ebx, [edi + 0x14]
push ebx
push eax
jmp 0x5052ae
push str._Device_Arrived
push eax
call dword [sym.imp.GDI32.dll_SetDCBrushColor]
push 0x12
call dword [sym.imp.GDI32.dll_GetStockObject]
lea ebx, [edi + 0x14]
push eax
push ebx
push dword [edi + 0x10]
call dword [sym.imp.USER32.dll_FillRect]
push dword [edi]
call sym.SystemInformer.exe_PhGetWindowDpi
push 0
push 0
push 0x31
push dword [edi]
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
push dword [edi + 0x10]
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword ds:[esp + 0x34], 0xffffffff
je 0x5054da
push 0
push 0
push 0x431
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword ds:[esp + 0x24], eax
test eax, eax
je 0x505430
mov esi, dword ds:[eax]
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
push ecx
mov esi, dword [esi + 0x40]
mov ecx, esi
push eax
call dword [0x5a38f4]
call esi
test byte [esp + 0x39], 0x40
je 0x505342
push dword [esp + 0x10]
push 0x2d
call sym.SystemInformer.exe_PhGetSystemMetrics
add dword ds:[ebx], eax
mov esi, dword [ebx]
jmp 0x505362
mov eax, dword [edi + 0x1c]
sub eax, dword [ebx]
sub eax, dword [esp + 0x18]
movzx ecx, byte [esp + 0xf]
cdq
sub eax, edx
shl ecx, 2
sar eax, 1
sub eax, ecx
add eax, dword [ebx]
mov dword [esp + 0x10], eax
mov esi, eax
mov eax, dword [edi + 0x20]
sub eax, dword [edi + 0x18]
sub eax, dword [esp + 0x14]
cdq
sub eax, edx
mov edx, eax
sar edx, 1
add edx, dword [edi + 0x18]
cmp dword [esp + 0x20], 0
sete al
movzx eax, al
push eax
push 0
push edx
push esi
push dword [edi + 0x10]
push dword [esp + 0x48]
push dword [esp + 0x3c]
call sym.SystemInformer.exe_PhImageListDrawIcon
cmp byte ds:[esp + 0xf], 0
je 0x505430
mov ecx, dword [esp + 0x1c]
mov edi, dword [edi + 0x10]
push 0xdedede
push edi
mov eax, dword [ecx + 0x20]
sub eax, dword [ecx + 0x18]
mov esi, dword [ecx + 0x1c]
cdq
sub esi, 0xb
sub eax, edx
mov dword [esp + 0x50], esi
sar eax, 1
sub eax, 2
lea ecx, [esi + 6]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
lea ecx, [esi + 3]
mov dword [esp + 0x5c], eax
add eax, 3
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], eax
call dword [sym.imp.GDI32.dll_SetDCPenColor]
push 0xdedede
push edi
call dword [sym.imp.GDI32.dll_SetDCBrushColor]
push 0x13
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x12
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push 3
lea eax, [esp + 0x4c]
push eax
push edi
call dword [sym.imp.GDI32.dll_Polygon]
mov edi, dword [esp + 0x1c]
test byte [esp + 0x39], 0x40
je 0x5054be
mov eax, dword [ebx]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x4c], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x54], eax
xor eax, eax
push 0x206
push eax
mov word [esp + 0x68], ax
lea eax, [esp + 0x6a]
push eax
call fcn.00582250
add esp, 0xc
lea eax, [esp + 0x60]
push eax
push dword [edi + 0x24]
push 0x44b
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageW]
movzx eax, byte [esp + 0xf]
push 0x100025
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x1c]
shl ecx, 2
sub eax, ecx
add dword [esp + 0x4c], eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x68]
push eax
call sym.SystemInformer.exe_PhCountStringZ
push eax
lea eax, [esp + 0x6c]
push eax
push dword [edi + 0x10]
call dword [sym.imp.USER32.dll_DrawTextW]
mov eax, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.005802ef
mov esp, ebp
pop ebp
ret 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.005802ef
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x26c]
mov eax, 0x30
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005802ef
mov esp, ebp
pop ebp
ret 4