Function at 0x405748
Capabilities:
Capture webcam image
Create thread
Delete file
Get common file path

Disassembly:
sub esp, 0x214
push ebx
push ebp
push esi
mov esi, dword [esp + 0x224]
xor ebx, ebx
push edi
cmp dword [esi + 0x536], ebx
mov dword [esp + 0x14], ebx
je 0x40587f
mov ebp, dword [sym.imp.USER32.dll_IsDlgButtonChecked]
push 0x3ed
push dword [esi + 0x10]
call ebp
cmp eax, ebx
mov dword [esi + 0x28], eax
je 0x4057a3
lea edi, [esi + 0x2c]
push 0x104
push edi
push 0x3ee
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_GetDlgItemTextA]
xor eax, eax
cmp byte [edi], bl
setne al
mov dword [esi + 0x28], eax
mov edi, 0x3f9
push edi
push dword [esi + 0x10]
call ebp
cmp eax, ebx
mov dword [esi + 0x146], eax
je 0x4057e1
cmp byte [esi + 0x14a], bl
je 0x4057d0
cmp byte [esi + 0x30e], bl
je 0x4057d0
cmp byte [esi + 0x20a], bl
jne 0x4057e1
push ebx
push edi
push dword [esi + 0x10]
mov dword [esi + 0x146], ebx
call dword [sym.imp.USER32.dll_CheckDlgButton]
lea edi, [esi + 0x546]
push edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x55e], ebx
je 0x40588a
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x28], ebx
mov edi, dword [sym.imp.MSVCRT.dll__beginthreadex]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x405839
inc dword [esi + 0x55e]
lea eax, [esp + 0x10]
push eax
push ebx
push esi
push 0x404ad2
push ebx
push ebx
call edi
add esp, 0x18
push eax
call ebp
cmp dword [esi + 0x146], ebx
je 0x40585d
inc dword [esi + 0x55e]
lea eax, [esp + 0x10]
push eax
push ebx
push esi
push 0x405306
push ebx
push ebx
call edi
add esp, 0x18
push eax
call ebp
dec dword [esi + 0x55e]
jne 0x405875
add esi, 0x562
push esi
call dword [sym.imp.MSVCRT.dll_remove]
pop ecx
mov byte [esi], bl
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret
lea eax, [esp + 0x120]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ebp, [esi + 0x562]
lea eax, [esp + 0x120]
push ebp
push ebx
push str.pjcs
push eax
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
inc dword [esi + 0x55e]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esi + 0x24], ebx
je 0x405930
push ebp
lea eax, [esp + 0x20]
push str._s.bmp
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_IsWindow]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x405901
push ebx
push ebx
push 0x43c
push dword [esi + 0xc]
call ebp
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40591e
lea eax, [esp + 0x1c]
push eax
push ebx
push 0x419
push dword [esi + 0xc]
call ebp
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.004046cd
pop ecx
pop ecx
jmp 0x405805
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40594f
push ebx
push ebx
push 0x446
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x405951
xor eax, eax
cmp eax, ebx
je 0x405a3b
push dword [esi + 0xc]
mov edi, dword [sym.imp.USER32.dll_IsWindow]
call edi
test eax, eax
je 0x40597c
push 0x40427a
push ebx
push 0x405
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SendMessageA]
push dword [esi + 0xc]
call edi
test eax, eax
je 0x405997
push ebx
push ebx
push 0x448
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x405999
xor eax, eax
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, ebx
mov ebp, str.Error_:_Unable_to_capture_frame_from_video_device_nEnabling_safe_mode
jne 0x4059b8
push ebx
push ebx
push ebp
push dword [esi + 0x10]
call edi
mov dword [esp + 0x14], 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4059d7
push ebx
push ebx
push 0x447
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4059d9
xor eax, eax
cmp eax, ebx
jne 0x4059ed
push ebx
push ebx
push ebp
push dword [esi + 0x10]
call edi
mov dword [esp + 0x14], 1
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x10]
cmp dword [esp + 0x14], ebx
je 0x405805
push 1
pop eax
push eax
push 0x434
push dword [esi + 0x10]
mov dword [esi + 0x24], eax
call dword [sym.imp.USER32.dll_CheckDlgButton]
push esi
call fcn.00405748
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [esi + 0x55e]
jne 0x405a35
push ebp
call dword [sym.imp.MSVCRT.dll_remove]
pop ecx
mov byte [ebp], bl
push edi
jmp 0x405879
push ebx
push ebx
push str.Error_:_Unable_to_begin_capturing_video_device_nEnabling_safe_mode
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [esp + 0x14], 1
jmp 0x4059f5