Function at 0x40afa0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e843
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x43a204]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x84], esi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.toupcam.dll_Toupcam_Open]
mov dword [esi + 0x54], eax
test eax, eax
jne 0x40b00b
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.Open_camera_failed.
push dword [esi + 4]
call fcn.00404410
add esp, 0x10
jmp 0x40b8a4
push eax
call dword [sym.imp.toupcam.dll_Toupcam_query_Model]
push 0
push dword [esi + 0x54]
mov dword [esi + 0x50], eax
call dword [sym.imp.toupcam.dll_Toupcam_put_eSize]
push 1
push 4
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
push 2
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_put_HZ]
push 0
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_put_AutoExpoEnable]
push dword [esi + 0x50]
lea ecx, [ebp - 0x78]
push dword [esi + 0x54]
call fcn.00402930
mov dword [ebp - 4], 0
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov edi, eax
mov eax, dword [ebp - 0x64]
test eax, eax
jne 0x40b087
call fcn.00413094
mov dword [ebp - 0x64], eax
test eax, eax
jne 0x40b087
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, esi
call fcn.00404880
jmp 0x40b89c
push 0
push 0
push eax
call fcn.00413196
lea eax, [ebp - 0x78]
mov dword [ebp - 0x70], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x43a02c
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x43a044]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x70]
push 0x43a02c
mov dword [0x43a044], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0x40eb90
push edi
push 0x6c
push dword [0x43b35c]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp eax, 1
je 0x40b0ed
mov ecx, esi
call fcn.00404880
jmp 0x40b89c
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x1304
push dword [esi + 0x4d0]
call ebx
test eax, eax
je 0x40b136
nop dword [eax + eax]
push 0
push 0
push 0x1308
push dword [esi + 0x4d0]
call ebx
push 0
push 0
push 0x1304
push dword [esi + 0x4d0]
call ebx
test eax, eax
jne 0x40b110
mov eax, dword [esi + 0x5b4]
lea ebx, [esi + 0x5b0]
mov edi, dword [ebx]
xor ecx, ecx
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x80], ecx
mov ecx, eax
sub ecx, edi
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40b1b9
xor esi, esi
nop word [eax + eax]
mov eax, dword [ebx]
push dword [eax + esi + 4]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov edi, dword [ebx]
add esi, 0xd0
inc dword [ebp - 0x80]
mov eax, 0x4ec4ec4f
mov dword [ebp - 0x8c], esi
mov esi, dword [ebx + 4]
mov ecx, esi
sub ecx, edi
mov dword [ebp - 0x7c], esi
mov esi, dword [ebp - 0x8c]
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x80], eax
jb 0x40b170
mov esi, dword [ebp - 0x84]
cmp edi, dword [ebp - 0x7c]
je 0x40b1dc
mov esi, dword [ebp - 0x7c]
mov eax, dword [edi]
mov ecx, edi
push 0
call dword [eax + 4]
add edi, 0xd0
cmp edi, esi
jne 0x40b1c1
mov edi, dword [ebx]
mov esi, dword [ebp - 0x84]
mov eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x28]
mov dword [ebx + 4], edi
mov dword [esi + 0x64], eax
lea eax, [esi + 0x5bc]
cmp eax, ecx
je 0x40b205
push dword [ebp - 0x88]
mov ecx, eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.00401760
lea ebx, [esi + 0x5c8]
lea eax, [ebp - 0x1c]
cmp ebx, eax
je 0x40b336
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebx]
mov dword [ebp - 0x7c], eax
sub eax, ecx
mov dword [ebp - 0x80], ecx
mov edi, eax
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x8c], eax
sub ecx, edx
mov eax, dword [ebx + 4]
sub eax, edx
sar edi, 3
sar ecx, 3
sar eax, 3
cmp edi, ecx
jbe 0x40b2e5
cmp edi, 0x1fffffff
ja 0x40b8c2
mov eax, ecx
shr eax, 1
mov dword [ebp - 0x84], eax
mov eax, 0x1fffffff
sub eax, dword [ebp - 0x84]
cmp ecx, eax
ja 0x40b27d
mov eax, dword [ebp - 0x84]
add eax, ecx
cmp eax, edi
cmovb eax, edi
mov edi, eax
test edx, edx
je 0x40b28a
push ecx
push edx
mov ecx, ebx
call fcn.0040ff90
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
test edi, edi
je 0x40b2c3
cmp edi, 0x1fffffff
ja 0x40b8c7
push edi
mov ecx, ebx
call fcn.0040fe70
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov eax, dword [ebx]
lea eax, [eax + edi*8]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x80]
sub eax, ecx
mov edi, dword [ebx]
push eax
push ecx
push edi
mov dword [ebp - 0x7c], eax
call fcn.00415590
mov eax, dword [ebp - 0x7c]
add esp, 0xc
add eax, edi
mov dword [ebx + 4], eax
jmp 0x40b336
mov ecx, dword [ebp - 0x80]
cmp edi, eax
jbe 0x40b320
shl eax, 3
push eax
push ecx
push edx
lea ebx, [ecx + eax]
call fcn.00415590
mov eax, dword [ebp - 0x7c]
mov edi, dword [esi + 0x5cc]
sub eax, ebx
push eax
push ebx
push edi
mov dword [ebp - 0x7c], eax
call fcn.00415590
mov eax, dword [ebp - 0x7c]
add esp, 0x18
add eax, edi
mov dword [esi + 0x5cc], eax
jmp 0x40b336
push dword [ebp - 0x8c]
lea edi, [edx + edi*8]
push ecx
push edx
call fcn.00415590
add esp, 0xc
mov dword [ebx + 4], edi
lea edi, [esi + 0x68]
mov dword [esi + 0x60], 1
push edi
lea eax, [ebp - 0xbc]
push eax
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_get_RawFormat]
mov ecx, dword [edi]
mov edx, 1
mov eax, dword [ebp - 0x4c]
shl edx, cl
mov dword [esi + 0x5c], edx
test al, 0x40
je 0x40b370
and eax, 0xf
imul edx, eax
imul edx, eax
mov dword [esi + 0x5c], edx
cmp ecx, 8
jbe 0x40b3a5
mov eax, dword [ebp - 0x44]
sub eax, 1
je 0x40b38b
sub eax, 1
jne 0x40b392
mov dword [esi + 0x60], 0x10
jmp 0x40b392
mov dword [esi + 0x60], 4
mov eax, dword [esi + 0x60]
mov ecx, 0x10000
imul eax, edx
cmp eax, ecx
cmovg eax, ecx
mov dword [esi + 0x5c], eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x94], 0
push eax
lea eax, [ebp - 0x94]
mov dword [ebp - 0x90], 0
push eax
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_get_FinalSize]
mov eax, 8
cmp eax, dword [edi]
sbb eax, eax
neg eax
inc eax
imul eax, dword [ebp - 0x90]
imul eax, dword [ebp - 0x94]
push eax
call fcn.00417ada
add esp, 4
mov dword [esi + 0x58], eax
lea ecx, [esi + 0x4d4]
push 0
push 0
call fcn.00411af0
mov cl, byte [edi]
mov eax, dword [ebp - 0xbc]
mov edi, dword [ebp - 0x90]
mov edx, dword [ebp - 0x94]
mov dword [esi + 0x4c4], eax
mov eax, dword [esi + 0x4c8]
mov byte [esi + 0x98], cl
mov dword [eax + 4], edx
mov eax, dword [esi + 0x4c8]
mov dword [eax + 8], edi
mov ecx, dword [esi + 0x4c8]
movzx eax, word [ecx + 0xe]
imul eax, edx
add eax, 0x1f
shr eax, 3
and eax, 0x1ffffffc
imul eax, edi
mov dword [ecx + 0x14], eax
mov eax, dword [esi + 0x4cc]
test eax, eax
je 0x40b472
push eax
call fcn.00417ad5
add esp, 4
mov dword [esi + 0x4cc], 0
mov eax, dword [esi + 0x4c8]
push dword [eax + 0x14]
call fcn.00417ada
mov ecx, dword [esi + 0x4c8]
mov dword [esi + 0x4cc], eax
push dword [ecx + 0x14]
push 0
push eax
call fcn.00415b10
add esp, 0x10
push 0
push dword [esi + 0x78]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [esi + 0x5c0]
lea ebx, [esi + 0x5b0]
sub ecx, dword [esi + 0x5bc]
mov eax, 0x2aaaaaab
imul ecx
push ebx
sar edx, 1
mov ecx, ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
call fcn.00401d50
mov ecx, dword [esi + 0x5c0]
mov eax, 0x2aaaaaab
sub ecx, dword [esi + 0x5bc]
imul ecx
mov dword [ebp - 0x84], 0
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40b6b0
xor edx, edx
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x80], edx
xor ecx, ecx
nop word [eax + eax]
mov ebx, dword [ebx]
test ecx, ecx
push dword [ebp - 0x88]
mov edi, dword [esi + 0x4d0]
mov ecx, 0x40000000
mov eax, 0x50000000
cmovne eax, ecx
add ebx, edx
mov dword [ebp - 0x8c], eax
lea eax, [ebx + 0x20]
push eax
push 0x43a070
push 0x43a028
push 0x43b354
call fcn.004015a0
add esp, 0x14
movzx eax, ax
mov ecx, ebx
push 0
push eax
push 0
push 0
push dword [ebp - 0x8c]
push 0
push 0
push edi
call fcn.00404930
mov eax, dword [esi + 0x5cc]
lea ebx, [esi + 0x5b0]
sub eax, dword [esi + 0x5c8]
push dword [esi + 0x5c]
mov ecx, dword [ebx]
add ecx, dword [ebp - 0x80]
sar eax, 3
push eax
call fcn.00411af0
mov eax, dword [esi + 0x5bc]
add eax, dword [ebp - 0x7c]
push dword [eax + 4]
lea eax, [ebp - 0x88]
push eax
call fcn.00405620
mov edx, eax
mov ecx, dword [esi + 0x5bc]
add ecx, dword [ebp - 0x7c]
mov byte [ebp - 4], 1
movzx eax, word [ecx + 8]
push eax
push dword [edx]
lea eax, [ebp - 0x98]
push str._sms___hu
push eax
call fcn.00405740
add esp, 0x18
mov edi, dword [eax]
push 0
push 0
push 0x1304
push dword [esi + 0x4d0]
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0xac], edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
xorps xmm0, xmm0
push ecx
push eax
push 0x133e
push dword [esi + 0x4d0]
movlpd qword [ebp - 0xb4], xmm0
movlpd qword [ebp - 0xa8], xmm0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xb8], 1
call edi
mov edx, dword [ebp - 0x98]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b64e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x88]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b670
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esi + 0x5c0]
mov eax, 0x2aaaaaab
sub ecx, dword [esi + 0x5bc]
inc dword [ebp - 0x84]
add dword [ebp - 0x80], 0xd0
add dword [ebp - 0x7c], 0xc
imul ecx
mov ecx, dword [ebp - 0x84]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 0x80]
cmp ecx, eax
jb 0x40b510
jmp 0x40b6b6
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebx]
mov dword [esi + 0x5a4], ecx
push 0
push dword [esi + 0x54]
lea eax, [ecx + 4]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [esi + 0x5a8], ecx
call dword [sym.imp.toupcam.dll_Toupcam_get_Temperature]
mov ebx, dword [sym.imp.USER32.dll_SetTimer]
cmp eax, 0x80004001
je 0x40b759
cmp dword [ebp - 0x48], 0
je 0x40b759
push 0
push 0
push 0x1304
push dword [esi + 0x4d0]
call edi
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0xa0], 0
push ecx
push eax
push 0x133e
push dword [esi + 0x4d0]
xorps xmm0, xmm0
mov dword [ebp - 0xb8], 1
movlpd qword [ebp - 0xb4], xmm0
movlpd qword [ebp - 0xa8], xmm0
mov dword [ebp - 0xac], str.Temperature
call edi
imul eax, dword [ebp - 0x48], 0x3e8
push 0
push eax
push 2
push dword [esi + 4]
call ebx
mov byte [esi + 0x72], 1
jmp 0x40b75d
mov byte [esi + 0x72], 0
push 0
push 0
push 0x1304
push dword [esi + 0x4d0]
call edi
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0xa0], 0
push ecx
push eax
push 0x133e
push dword [esi + 0x4d0]
xorps xmm0, xmm0
mov dword [ebp - 0xb8], 1
movlpd qword [ebp - 0xb4], xmm0
movlpd qword [ebp - 0xa8], xmm0
mov dword [ebp - 0xac], str.Video
call edi
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0
push eax
push 0xb
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_get_Option]
cmp dword [ebp - 0x9c], 0
mov dword [esi + 0x5ac], 0
setne al
mov byte [esi + 0x70], al
mov eax, dword [esi + 0x5bc]
push dword [eax + 4]
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_put_ExpoTime]
mov eax, dword [esi + 0x5ac]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x5bc]
movzx eax, word [eax + ecx*4 + 8]
push eax
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_put_ExpoAGain]
push 0x8001
push dword [esi + 4]
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_StartPullModeWithWndMsg]
cmp byte [esi + 0x70], 0
je 0x40b83d
push 1
push dword [esi + 0x54]
call dword [sym.imp.toupcam.dll_Toupcam_Trigger]
mov byte [esi + 0x71], 0
push 0
push 0xa
push 1
push dword [esi + 4]
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x6c], eax
mov eax, dword [esi + 0x50]
push dword [eax]
lea eax, [ebp - 0x88]
push str.Consistency_Test:___s_
push eax
call fcn.00405740
add esp, 0xc
push dword [eax]
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov edx, dword [ebp - 0x88]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b893
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
mov ecx, esi
call fcn.0040f0a0
lea ecx, [ebp - 0x78]
call fcn.00403250
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00413a6c
mov esp, ebp
pop ebp
ret 4
call fcn.0040fd20
call fcn.0040fd20
int3