Function at 0x408930
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e690
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x43a204]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
mov eax, dword [edi + 0x50]
cmp eax, dword [edi + 0x54]
je 0x4092af
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx + 8]
and eax, 0x10000
or eax, 0
je 0x4089c3
push 0x421
push dword [edi + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0
push 0x147
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov esi, eax
push esi
push 7
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], esi
push eax
push 4
push 0
push 0x42fc50
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx + 8]
mov ebx, 0xffffffff
and eax, 0x20000
or eax, 0
je 0x408b9f
lea eax, [edi + 4]
push 0x422
push dword [eax]
mov dword [ebp - 0x34], eax
call dword [sym.imp.USER32.dll_IsDlgButtonChecked]
mov esi, eax
xor ebx, ebx
test esi, esi
setne bl
push ebx
push 8
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], ebx
push eax
push 4
push 0
push 0x42fc78
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
je 0x408b9c
call fcn.00405ce0
mov ecx, eax
test ecx, ecx
je 0x4092e5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 0
push eax
push 0x423
lea ecx, [edi + 4]
call fcn.004059e0
mov esi, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
push esi
mov dword [ebp - 0x20], 0
call fcn.0041bc72
mov eax, dword [ebp - 0x20]
add esp, 8
fstp qword [ebp - 0x48]
test eax, eax
je 0x408ae2
cmp word [eax], 0
je 0x408ae2
mov eax, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x423
push dword [edi + 4]
call eax
push 1
push eax
mov eax, dword [sym.imp.USER32.dll_SendMessageW]
push 0x28
push dword [edi + 4]
call eax
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.Format_error.
push dword [edi + 4]
call fcn.00404410
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4092af
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4092af
or ebx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408b03
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
movsd xmm0, qword [ebp - 0x48]
mulsd xmm0, qword [0x430400]
cvttsd2si esi, xmm0
lea eax, [esi + 0x1f4]
cmp eax, 0x384
ja 0x408b4a
push esi
push 0xf
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], esi
push eax
push 4
push 0
push str.tectarget
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x408b9f
movaps xmm0, xmmword [0x430410]
lea eax, [ebp + 0xc]
sub esp, 0x10
movups xmmword [esp], xmm0
push str.Tec_target_out_of_range___.1f___.1f_.
push eax
call fcn.00405740
add esp, 0x18
push 0x30
push ecx
mov ecx, esp
mov dword [ebp - 4], 1
mov dword [ecx], 0
mov ecx, dword [eax]
push ecx
mov eax, esp
mov dword [eax], ecx
mov eax, dword [ebp - 0x34]
push dword [eax]
call fcn.00404410
add esp, 0x10
lea ecx, [ebp + 0xc]
call fcn.00402f30
jmp 0x4092af
or ebx, 0xffffffff
mov edx, dword [edi + 0x20]
xor eax, eax
mov ecx, dword [edx + 0xc]
and ecx, 0x80
or eax, ecx
je 0x408c1d
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], 0
push eax
push 0x36
push dword [edi + 0x24]
mov dword [ebp - 0x24], 0
call dword [sym.imp.toupcam.dll_Toupcam_get_Option]
push dword [ebp - 0x24]
lea ecx, [ebp - 0x20]
push 0
push ecx
lea eax, [edi + 4]
push 0x408
push eax
call fcn.004058a0
add esp, 0x14
test al, al
jne 0x4092af
mov esi, dword [ebp - 0x20]
lea eax, [ebp - 0x38]
push 4
push eax
push 4
push 0
push str.heat
push dword [edi + 0x38]
mov dword [ebp - 0x38], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
push 0x37
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
mov edx, dword [edi + 0x20]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
and ecx, 0x4000000
and eax, 8
or ecx, eax
je 0x408c79
mov eax, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x409
push dword [edi + 4]
call eax
push 0
push 0
push 0x147
push eax
mov eax, dword [sym.imp.USER32.dll_SendMessageW]
call eax
mov esi, eax
push esi
push 0x19
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], esi
push eax
push 4
push 0
push 0x42fc70
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [edi + 0x54]
mov eax, 0x2aaaaaab
sub ecx, dword [edi + 0x50]
xor esi, esi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x38], eax
je 0x408cd8
mov eax, dword [edi + 0x50]
add eax, 8
nop dword [eax]
mov ecx, dword [eax - 4]
cmp ecx, dword [edi + 0x44]
jb 0x408e5b
cmp ecx, dword [edi + 0x48]
ja 0x408e5b
movzx ecx, word [eax]
movzx edx, word [edi + 0x4c]
cmp cx, dx
jb 0x408df8
cmp cx, word [edi + 0x4e]
ja 0x408df8
inc esi
add eax, 0xc
cmp esi, dword [ebp - 0x38]
jb 0x408ca0
push 0x41e
push dword [edi + 4]
lea ebx, [edi + 4]
mov dword [ebp - 0x14], 0xa
mov dword [ebp - 0x10], 0xa
call dword [sym.imp.USER32.dll_IsDlgButtonChecked]
test eax, eax
je 0x408efa
push 0x14
push 1
lea eax, [ebp - 0x14]
push eax
push 0x40a
push ebx
call fcn.004058a0
add esp, 0x14
test al, al
jne 0x4092af
push 0x14
push 1
lea eax, [ebp - 0x10]
push eax
push 0x40b
push ebx
call fcn.004058a0
add esp, 0x14
test al, al
jne 0x4092af
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push 4
push 0
push 0x42fbe8
push dword [edi + 0x38]
call esi
mov eax, dword [ebp - 0x10]
push 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push 4
push 0
push 0x42fbf0
push dword [edi + 0x38]
call esi
push 0x64
push 3
lea eax, [edi + 0x28]
push eax
push 0x40c
push ebx
call fcn.004058a0
add esp, 0x14
test al, al
jne 0x4092af
push 8
push 1
lea esi, [edi + 0x2c]
push esi
push 0x40f
push ebx
call fcn.004058a0
add esp, 0x14
test al, al
jne 0x4092af
test byte [edi + 0x28], 1
jne 0x408f29
push 0x40c
push dword [ebx]
call dword [sym.imp.USER32.dll_GetDlgItem]
push 1
push eax
push 0x28
push dword [ebx]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.Area_must_be_odd_number.
push dword [ebx]
call fcn.00404410
add esp, 0x10
jmp 0x4092af
movzx eax, word [edi + 0x4e]
push eax
push edx
lea eax, [ebp + 0xc]
push str.Exposure_gain_out_of_range___hu___hu_.
push eax
call fcn.00405740
add esp, 0x10
push 0x30
push ecx
mov ecx, esp
mov dword [ebp - 4], 5
mov dword [ecx], 0
mov ecx, dword [eax]
push ecx
mov eax, esp
mov dword [eax], ecx
push dword [edi + 4]
call fcn.00404410
mov edx, dword [ebp + 0xc]
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4092af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4092af
push dword [edi + 0x48]
lea eax, [ebp - 0x34]
push eax
call fcn.00405620
mov esi, eax
push dword [edi + 0x44]
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 2
push eax
call fcn.00405620
push dword [esi]
mov byte [ebp - 4], 3
push dword [eax]
lea eax, [ebp + 0xc]
push str.Exposure_time_out_of_range___s___s_.
push eax
call fcn.00405740
add esp, 0x20
push 0x30
push ecx
mov ecx, esp
mov byte [ebp - 4], 4
mov dword [ecx], 0
mov ecx, dword [eax]
push ecx
mov eax, esp
mov dword [eax], ecx
push dword [edi + 4]
call fcn.00404410
mov edx, dword [ebp + 0xc]
add esp, 0x10
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408ed4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x38]
mov eax, ebx
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408ef2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x34]
jmp 0x408e36
mov eax, dword [edi + 0x5c]
cmp eax, dword [edi + 0x60]
jne 0x408d75
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.Empty_csv_file.
push dword [ebx]
call fcn.00404410
add esp, 0x10
jmp 0x4092af
push 0
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_get_Temperature]
cmp eax, 0x80004001
je 0x408f7c
push 0xe10
push 0
lea esi, [edi + 0x30]
push esi
push 0x41d
push ebx
call fcn.004058a0
add esp, 0x14
test al, al
jne 0x4092af
mov eax, dword [esi]
push 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push 4
push 0
push str.temp
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea esi, [edi + 0x2c]
cmp dword [esi], 1
jbe 0x408ff0
push 0x40e
push dword [ebx]
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0
mov esi, eax
push 0x147
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push 4
push 0
push str.binmethod
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0
push 0
push 0x147
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
lea esi, [edi + 0x2c]
sub eax, 1
je 0x408fe3
sub eax, 1
je 0x408fdd
or dword [esi], 0x40
jmp 0x408fe3
or dword [esi], 0x80
push dword [esi]
push 0x17
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
mov eax, dword [edi + 0x28]
shr eax, 1
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push dword [edi + 0x24]
mov dword [ebp - 0x20], 0
call dword [sym.imp.toupcam.dll_Toupcam_get_FinalSize]
push 0x41e
push dword [ebx]
call dword [sym.imp.USER32.dll_IsDlgButtonChecked]
test eax, eax
je 0x4090f2
mov eax, dword [ebp - 0x10]
lea ecx, [edi + 0x5c]
imul eax, dword [ebp - 0x14]
push ecx
mov dword [ebp - 0x28], ecx
push eax
call fcn.00402680
mov eax, dword [ebp - 0x1c]
xor edx, edx
div dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
xor edx, edx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x20]
div esi
mov edx, eax
mov dword [ebp - 0x30], edx
test esi, esi
je 0x4090f2
lea eax, [esi*8]
xor ecx, ecx
mov dword [ebp - 0x44], eax
xor ebx, ebx
lea eax, [edx + edx]
mov dword [ebp - 0x18], ecx
mov edi, esi
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], edi
xor esi, esi
test eax, eax
je 0x4090d2
mov edi, dword [ebp - 0x2c]
mov eax, edx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x3c], eax
mov eax, edi
lea ebx, [ebx + 8]
cdq
sub eax, edx
lea edx, [ecx + esi]
mov ecx, dword [ebp - 0x28]
inc esi
sar eax, 1
mov ecx, dword [ecx]
mov dword [ecx + edx*8], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [eax]
mov dword [ebx + eax - 4], ecx
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x10]
lea edi, [edi + ecx*2]
mov ecx, dword [ebp - 0x18]
cmp esi, eax
jb 0x409097
mov edx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x38]
add edx, dword [ebp - 0x40]
add ecx, dword [ebp - 0x14]
add ebx, dword [ebp - 0x44]
sub edi, 1
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], edi
jne 0x409084
mov edi, dword [ebp - 0x4c]
lea ebx, [edi + 4]
mov eax, dword [edi + 0x60]
xor ecx, ecx
mov edx, dword [edi + 0x5c]
sub eax, edx
sar eax, 3
test eax, eax
je 0x409144
mov eax, dword [ebp - 0x24]
mov esi, dword [edx + ecx*8]
add eax, esi
cmp eax, dword [ebp - 0x1c]
jae 0x4092c5
mov eax, dword [ebp - 0x24]
cmp esi, eax
jbe 0x4092c5
mov esi, dword [edx + ecx*8 + 4]
add eax, esi
cmp eax, dword [ebp - 0x20]
jae 0x4092c5
cmp esi, dword [ebp - 0x24]
jbe 0x4092c5
mov eax, dword [edi + 0x60]
inc ecx
sub eax, edx
sar eax, 3
cmp ecx, eax
jb 0x409103
mov eax, dword [edi + 0x28]
push 4
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push 4
push 0
push str.area
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, dword [edi + 0x50]
mov eax, 0x2aaaaaab
mov ecx, dword [edi + 0x54]
sub ecx, esi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
shl eax, 2
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 3
push 0
push str.expo
push dword [edi + 0x38]
call esi
mov eax, dword [edi + 0x2c]
push 4
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push 4
push 0
push str.binvalue
push dword [edi + 0x38]
call esi
push 0
push 6
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_get_Option]
cmp eax, 0x80004001
je 0x409247
push 0x412
push dword [ebx]
call dword [sym.imp.USER32.dll_IsDlgButtonChecked]
push 4
mov esi, eax
xor ebx, ebx
lea eax, [ebp - 0x4c]
test esi, esi
push eax
push 4
push 0
push str.bitdepth
push dword [edi + 0x38]
setne bl
mov dword [ebp - 0x4c], ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push ebx
push 6
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
lea ebx, [edi + 4]
test esi, esi
je 0x409247
push 0x410
push dword [ebx]
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0
push 0x147
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 4
mov dword [edi + 0x34], eax
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push 4
push 0
push str.scale
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x40d
push dword [ebx]
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0
mov esi, eax
push 0x147
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push 4
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push 4
push 0
push str.trigger
push dword [edi + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0
push 0
push 0x147
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jne 0x4092a2
push 1
push 0xb
push dword [edi + 0x24]
call dword [sym.imp.toupcam.dll_Toupcam_put_Option]
movzx eax, word [ebp + 0xc]
push eax
push dword [ebx]
call dword [sym.imp.USER32.dll_EndDialog]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x30
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.Image_size_overflow.
push dword [ebx]
call fcn.00404410
add esp, 0x10
jmp 0x4092af
push 0x80004005
call fcn.00404590
int3