Function at 0x40cec2
Capabilities:
Capture webcam image

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x42e07c]
xor eax, esp
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x14]
xor edx, edx
sub eax, edx
mov esi, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
je 0x40d1d2
dec eax
je 0x40cfde
dec eax
dec eax
jne 0x40cf5b
mov eax, dword [ebp + 0xc]
cmp eax, 0x200
jne 0x40cf20
xor edi, edi
inc edi
lea edx, [esp + 0x10]
mov dword [esp + 0x10], edi
call fcn.0040fa0b
jmp 0x40d184
cmp eax, 0x104
jne 0x40cf40
mov ebx, dword [ebp + 0x10]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 1
call fcn.0040fb6a
jmp 0x40d37d
cmp eax, 0x105
jne 0x40cf71
mov al, byte [esi + 0x85]
test al, 8
jne 0x40cf59
or al, 8
mov byte [esi + 0x85], al
mov dword [ebx], edx
xor eax, eax
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004144e4
mov esp, ebp
pop ebp
ret 0x18
cmp eax, 0x106
jne 0x40cf9b
xor eax, eax
test byte [esi + 0x84], 1
jne 0x40cf92
mov ecx, dword [esi + 0x20]
cmp ecx, dword [esi + 4]
je 0x40cf92
cmp dword [ebp + 0x10], 0x20
je 0x40cf92
inc eax
mov dword [ebx], edx
cmp eax, edx
jmp 0x40d388
cmp eax, 0x100
jne 0x40cfbd
lea eax, [esp + 0x10]
push eax
push dword [ebp + 0x10]
xor edi, edi
inc edi
mov eax, esi
mov dword [esp + 0x18], edi
call fcn.0040fc02
jmp 0x40d184
cmp eax, 0x213
jne 0x40cfcc
mov dword [ebx], 1
jmp 0x40cf5b
cmp eax, 0x102
jne 0x40cf5b
xor eax, eax
cmp dword [ebp + 0x10], 0x1b
sete al
jmp 0x40cf92
cmp dword [ebp + 0xc], 0x4e
jne 0x40d097
cmp dword [edi + 8], 0xfffffd37
jne 0x40d021
mov eax, dword [edi]
mov dword [esp + 0x10], 1
cmp eax, dword [esi + 4]
je 0x40d008
mov dword [esp + 0x10], edx
xor eax, eax
jmp 0x40d015
lea eax, [esp + 0x10]
push eax
push edi
call fcn.0040f663
xor edx, edx
mov dword [ebx], eax
cmp dword [esp + 0x10], edx
jne 0x40d1e8
cmp dword [edi + 8], 0xfffffd3a
jne 0x40d0cb
mov ecx, dword [edi]
xor eax, eax
inc eax
mov dword [esp + 0x10], eax
cmp ecx, dword [esi + 4]
je 0x40d042
mov dword [esp + 0x10], edx
jmp 0x40d08a
call dword [sym.imp.USER32.dll_GetFocus]
cmp eax, dword [esi + 4]
je 0x40d058
mov edi, esi
call fcn.00411a4d
mov edi, dword [esp + 0x14]
mov edi, dword [edi + 0xc]
push 0
push edi
push 0x419
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SendMessageW]
and byte [esi + 0x84], 0xcf
push 1
mov ecx, eax
mov ebx, esi
call fcn.00411173
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
xor eax, eax
xor edx, edx
mov dword [ebx], eax
cmp dword [esp + 0x10], edx
je 0x40d0cb
jmp 0x40d1e8
mov eax, 0x117
cmp dword [ebp + 0xc], eax
jne 0x40d0cb
push dword [ebp + 0x10]
mov ecx, edi
push eax
lea edx, [esp + 0x18]
mov edi, esi
mov dword [esp + 0x18], 1
call fcn.0040edac
cmp dword [esp + 0x10], 0
mov dword [ebx], eax
jne 0x40d1e8
mov edi, dword [esp + 0x14]
call fcn.0040fee3
cmp dword [ebp + 0xc], eax
je 0x40d321
mov eax, dword [ebp + 0xc]
cmp eax, 0x112
jne 0x40d0fe
push dword [ebp + 0x10]
lea ebx, [esp + 0x14]
mov eax, esi
mov dword [esp + 0x14], 1
call fcn.0040f6f2
jmp 0x40d37d
cmp eax, 0x52e
je 0x40d41c
cmp eax, 0x120
je 0x40d365
cmp eax, 0x52f
je 0x40d42b
cmp eax, 0x52d
je 0x40d44b
cmp eax, 0x1a
jne 0x40d157
cmp dword [ebp + 0x10], 0x2a
je 0x40d14b
cmp dword [ebp + 0x10], 0x100b
je 0x40d14b
cmp dword [ebp + 0x10], 0x1023
jne 0x40cfc4
mov ecx, esi
call fcn.004115d0
jmp 0x40cfc4
cmp eax, 0x2b
je 0x40d458
cmp eax, 0x2c
je 0x40d485
cmp eax, 6
jne 0x40d198
lea eax, [esp + 0x10]
push eax
push dword [ebp + 0x10]
xor edi, edi
inc edi
mov eax, esi
mov dword [esp + 0x18], edi
call fcn.0040f7a0
cmp dword [esp + 0x10], 0
mov dword [ebx], eax
je 0x40cf5b
mov eax, edi
jmp 0x40cf5d
cmp eax, 0x4e
jne 0x40cf5b
cmp dword [edi + 8], 0xfffffff4
jne 0x40cf5b
mov ecx, dword [edi]
xor eax, eax
mov dword [esp + 0x10], eax
cmp ecx, dword [esi + 4]
jne 0x40d3b3
lea edx, [esp + 0x10]
mov ecx, edi
mov ebx, esi
call fcn.0040f7ff
mov ebx, dword [esp + 0x18]
jmp 0x40d3b3
mov ecx, dword [ebp + 0xc]
xor eax, eax
inc eax
cmp ecx, eax
jne 0x40d1f0
push edi
push dword [ebp + 0x10]
push eax
call fcn.0040e90d
mov dword [ebx], eax
xor eax, eax
inc eax
jmp 0x40cf5d
cmp ecx, 2
jne 0x40d203
push edi
push dword [ebp + 0x10]
mov eax, esi
push ecx
call fcn.0040ea6b
jmp 0x40d1e6
cmp ecx, 0x14
jne 0x40d261
test byte [esi + 0x84], 2
mov dword [esp + 0x10], eax
jne 0x40d251
test byte [esi + 0x58], 1
jne 0x40d251
and dword [esp + 0x1c], edx
xor eax, eax
lea edi, [esp + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetClientRect]
push 5
lea eax, [esp + 0x20]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_FillRect]
mov edi, dword [esp + 0x14]
xor eax, eax
inc eax
xor edx, edx
jmp 0x40d257
mov dword [esp + 0x10], edx
xor eax, eax
mov dword [ebx], eax
cmp dword [esp + 0x10], edx
je 0x40d2d0
jmp 0x40d1e8
cmp ecx, 0x116
jne 0x40d29d
push 0
push 0
push 0x447
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [esi + 0x44]
movzx eax, ax
or eax, 0x900000
push eax
push 0x11f
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebx], 1
jmp 0x40d2d0
mov eax, 0x117
cmp ecx, eax
jne 0x40d2f2
push dword [ebp + 0x10]
mov ecx, edi
push eax
lea edx, [esp + 0x18]
mov edi, esi
mov dword [esp + 0x18], 1
call fcn.0040edac
cmp dword [esp + 0x10], 0
mov dword [ebx], eax
jne 0x40d1e8
mov edi, dword [esp + 0x14]
call fcn.0040fea2
cmp dword [ebp + 0xc], eax
jne 0x40d317
mov ecx, dword [ebp + 0x10]
push 0
mov ebx, esi
call fcn.00411173
mov eax, dword [esp + 0x18]
and dword [eax], 0
jmp 0x40d1e8
mov eax, 0x11f
cmp ecx, eax
jne 0x40d2d0
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [ebp + 0x10]
push eax
mov eax, edi
mov edi, esi
mov dword [esp + 0x18], 1
call fcn.0040f0da
jmp 0x40d2bf
call fcn.0040fee3
cmp dword [ebp + 0xc], eax
jne 0x40d32f
mov eax, dword [ebp + 0x10]
push esi
call fcn.0040f21b
jmp 0x40d1e6
mov eax, dword [ebp + 0xc]
cmp eax, 0x1a
jne 0x40d35e
cmp dword [ebp + 0x10], 0x2a
je 0x40d34f
cmp dword [ebp + 0x10], 0x100b
je 0x40d34f
cmp dword [ebp + 0x10], 0x1023
jne 0x40d356
mov ecx, esi
call fcn.004115d0
and dword [ebx], 0
jmp 0x40d1e8
cmp eax, 0x120
jne 0x40d393
push dword [ebp + 0x10]
lea edx, [esp + 0x14]
mov ecx, edi
mov ebx, esi
mov dword [esp + 0x14], 1
call fcn.0040f249
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
cmp dword [esp + 0x10], 0
je 0x40cf5b
jmp 0x40d1e8
cmp eax, 0x100
jne 0x40d3b7
lea eax, [esp + 0x10]
push eax
push dword [ebp + 0x10]
mov eax, edi
mov ecx, esi
mov dword [esp + 0x18], 1
call fcn.0040ebcd
mov dword [ebx], eax
jmp 0x40d383
cmp eax, 0x101
jne 0x40d3d0
xor eax, eax
inc eax
cmp dword [ebp + 0x10], 0x20
je 0x40d3c9
xor eax, eax
and dword [ebx], 0
test eax, eax
jmp 0x40d388
cmp eax, 0x102
jne 0x40d3f8
cmp dword [ebp + 0x10], 0x20
mov dword [esp + 0x10], 1
je 0x40d3f4
lea eax, [esp + 0x10]
push eax
push dword [ebp + 0x10]
call fcn.0040ec7f
jmp 0x40d3b3
xor eax, eax
jmp 0x40d3b3
cmp eax, 0x104
jne 0x40d407
and dword [ebx], 0
jmp 0x40cf5b
cmp eax, 0x105
je 0x40d3ff
cmp eax, 0x106
je 0x40d3ff
cmp eax, 0x52e
jne 0x40d424
mov eax, dword [esi + 0x44]
jmp 0x40d1e6
cmp eax, 0x52f
jne 0x40d444
test edi, edi
jne 0x40d436
xor eax, eax
jmp 0x40d1e6
mov eax, edi
mov ecx, esi
call fcn.0040f5f2
jmp 0x40d1e6
cmp eax, 0x52d
jne 0x40d453
mov eax, dword [esi + 4]
jmp 0x40d1e6
cmp eax, 0x2b
jne 0x40d480
xor eax, eax
inc eax
mov dword [esp + 0x10], eax
cmp dword [edi], eax
jne 0x40d476
lea eax, [esp + 0x10]
push eax
mov edx, edi
mov ecx, esi
call fcn.0040f5ba
jmp 0x40d3b3
and dword [esp + 0x10], 0
jmp 0x40d3b3
cmp eax, 0x2c
jne 0x40d4c4
mov ecx, dword [edi + 0x14]
xor eax, eax
inc eax
mov dword [esp + 0x10], eax
cmp dword [edi], eax
jne 0x40d4ad
test ecx, ecx
je 0x40d4ad
cmp dword [ecx], 0x1313
jne 0x40d4ad
mov edx, edi
mov ecx, esi
call fcn.00410f0d
xor eax, eax
inc eax
jmp 0x40d4b2
and dword [esp + 0x10], 0
cmp dword [esp + 0x10], 0
mov dword [ebx], eax
je 0x40cf5b
jmp 0x40cf5d
cmp eax, 0x37f
jne 0x40cf5b
mov eax, edi
mov ecx, esi
call fcn.0040e8b6
jmp 0x40d1e6