Function at 0x4054d0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46cb9b
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x52e4bc]
xor eax, ebp
mov dword [ebp - 0x40], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x230], ecx
push 2
mov ecx, dword [ebp - 0x230]
call fcn.00411000
push 3
mov ecx, dword [ebp - 0x230]
call fcn.00411000
mov eax, dword [ebp - 0x230]
mov cl, byte [eax + 0x278]
mov byte [ebp - 0x15], cl
mov byte [ebp - 0x29], 0
mov edx, dword [ebp - 0x230]
movzx eax, byte [edx + 0x278]
cmp eax, 2
jne 0x40557a
push 0
push 0
push str.Camera_is_closed_Please_Open_it.
call fcn.004389d8
push 0
push 0xc8
push 2
mov ecx, dword [ebp - 0x230]
call fcn.00410fd0
push 0
push 0x64
push 3
mov ecx, dword [ebp - 0x230]
call fcn.00410fd0
jmp 0x405d12
mov ecx, dword [ebp - 0x230]
mov byte [ecx + 0x278], 2
push 0
push 0x3e8
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
push 0
push 0x452
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x4055e9
push 0xffffffffffffffff
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax + 0x2b8]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x230]
mov eax, dword [edx + 0x2b8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx + 0x2bc]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax + 0x2bc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x230]
mov ax, word [edx + 0x1c8]
mov word [ebp - 0x28], ax
mov ecx, dword [ebp - 0x230]
mov dx, word [ecx + 0x1ca]
mov word [ebp - 0x24], dx
mov eax, dword [ebp - 0x230]
mov cl, byte [eax + 0x1cc]
mov byte [ebp - 0x16], cl
push 0x471b84
mov edx, dword [ebp - 0x230]
mov eax, dword [edx + 0x1dc]
push eax
call fcn.004539a0
add esp, 8
test eax, eax
jne 0x40566b
movzx ecx, word [ebp - 0x24]
add ecx, 0xa
mov word [ebp - 0x24], cx
movzx edx, word [ebp - 0x28]
movzx eax, word [ebp - 0x24]
imul edx, eax
imul edx, edx, 3
push edx
call fcn.004538d6
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4056d0
push 0
push 0
push 0x471b8c
call fcn.004389d8
push 1
push 0x3e8
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
push 1
push 0x452
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
jmp 0x405d12
mov ecx, dword [ebp - 0x230]
movzx edx, byte [ecx + 0x1cc]
cmp edx, 5
jne 0x4056ee
mov dword [ebp - 0x234], 0x10
jmp 0x40570d
mov eax, dword [ebp - 0x230]
movzx ecx, byte [eax + 0x1cc]
sub ecx, 1
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 1
mov dword [ebp - 0x234], ecx
mov dl, byte [ebp - 0x234]
mov byte [ebp - 0x2a], dl
movzx eax, word [ebp - 0x28]
movzx ecx, word [ebp - 0x24]
imul eax, ecx
movzx edx, byte [ebp - 0x2a]
imul eax, edx
add eax, 0x100000
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
call fcn.004538d6
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x405796
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004537f9
add esp, 4
push 0
push 0
push str.Memory_allocate_error_
call fcn.004389d8
push 1
push 0x3e8
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
push 1
push 0x452
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
jmp 0x405d12
mov edx, dword [ebp - 0x10]
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00452f40
add esp, 0xc
mov dword [ebp - 0x14], 0
jmp 0x4057ba
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 5
jae 0x405839
mov edx, dword [ebp - 0x230]
movzx eax, byte [edx + 0x1cc]
cmp eax, 5
jne 0x4057de
mov dword [ebp - 0x238], 0x10
jmp 0x4057fd
mov ecx, dword [ebp - 0x230]
movzx edx, byte [ecx + 0x1cc]
sub edx, 1
neg edx
sbb edx, edx
neg edx
add edx, 1
mov dword [ebp - 0x238], edx
mov al, byte [ebp - 0x238]
mov byte [ebp - 0x2b], al
movzx ecx, word [ebp - 0x28]
movzx edx, word [ebp - 0x24]
imul ecx, edx
movzx eax, byte [ebp - 0x2b]
imul ecx, eax
push ecx
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x230]
mov ecx, dword [edx + 0x53c4]
call fcn.0041f6f0
test eax, eax
je 0x405834
jmp 0x405839
jmp 0x4057b1
cmp dword [ebp - 0x14], 5
jne 0x405852
push 0
push 0
push str.failed_to_save_
call fcn.004389d8
jmp 0x405c7e
mov eax, dword [ebp - 0x230]
mov cx, word [eax + 0x1ca]
mov word [ebp - 0x24], cx
movzx edx, word [ebp - 0x28]
movzx eax, word [ebp - 0x24]
imul edx, eax
movzx ecx, byte [ebp - 0x16]
sub ecx, 1
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 1
imul edx, ecx
push edx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax + 0x53c4]
call fcn.0041f2b0
mov ecx, dword [ebp - 0x230]
movzx edx, word [ecx + 0x1ca]
push edx
mov eax, dword [ebp - 0x230]
movzx ecx, word [eax + 0x1c8]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x230]
mov ecx, dword [ecx + 0x53c4]
call fcn.00420890
mov edx, dword [ebp - 0x230]
mov al, byte [ebp - 0x15]
mov byte [edx + 0x278], al
movzx ecx, byte [ebp - 0x15]
test ecx, ecx
jne 0x405913
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [ebp - 0x230]
mov dword [edx + 0x2b8], eax
mov eax, dword [ebp - 0x230]
push eax
push 0
push 0x4187a0
call fcn.00453742
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp - 0x230]
mov dword [ecx + 0x2bc], eax
mov edx, dword [ebp - 0x230]
push edx
push 0
push 0x418a00
call fcn.00453742
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
call fcn.00410b60
lea ecx, [ebp - 0x3c]
call fcn.00411190
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00410cf0
push eax
lea ecx, [ebp - 0x38]
call fcn.00410cb0
push eax
lea ecx, [ebp - 0x38]
call fcn.00410c70
push eax
lea ecx, [ebp - 0x38]
call fcn.00410c30
push eax
lea ecx, [ebp - 0x38]
call fcn.00410b80
push eax
push str.P_02d_02d_02d_02d_02d
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004113c0
add esp, 0x1c
lea ecx, [ebp - 0x30]
call fcn.00411190
mov byte [ebp - 4], 1
push str.Jpeg_File_.jpg_.jpgBitmap_File_.bmp_.bmpRaw_File_.raw_.raw
lea ecx, [ebp - 0x210]
call fcn.00401860
mov byte [ebp - 4], 2
push 0
push 0
lea ecx, [ebp - 0x210]
call fcn.00401920
push eax
push 6
lea ecx, [ebp - 0x3c]
call fcn.00401920
push eax
push 0
push 0
lea ecx, [ebp - 0x20c]
call fcn.004414d5
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x20c]
call fcn.004413a9
cmp eax, 1
jne 0x405c45
lea edx, [ebp - 0x220]
push edx
lea ecx, [ebp - 0x20c]
call fcn.00441681
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x240], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x240]
push ecx
lea ecx, [ebp - 0x3c]
call fcn.004111d0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x220]
call fcn.004018e0
lea ecx, [ebp - 0x20c]
call fcn.004410c7
movzx edx, word [eax + 0x3a]
test edx, edx
jne 0x405abc
lea ecx, [ebp - 0x20c]
call fcn.004410c7
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x244], eax
cmp dword [ebp - 0x244], 1
je 0x405a85
cmp dword [ebp - 0x244], 2
je 0x405a94
cmp dword [ebp - 0x244], 3
je 0x405aa3
jmp 0x405ab0
push 0x471c30
lea ecx, [ebp - 0x30]
call fcn.00401900
jmp 0x405ab0
push 0x471c38
lea ecx, [ebp - 0x30]
call fcn.00401900
jmp 0x405ab0
push 0x471c40
lea ecx, [ebp - 0x30]
call fcn.00401900
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00410120
push 4
lea edx, [ebp - 0x224]
push edx
lea ecx, [ebp - 0x3c]
call fcn.004103d0
mov dword [ebp - 0x248], eax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x24c], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x24c]
push ecx
lea ecx, [ebp - 0x30]
call fcn.004111d0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x224]
call fcn.004018e0
lea ecx, [ebp - 0x30]
call fcn.00410160
push str..raw
lea edx, [ebp - 0x30]
push edx
call fcn.004106e0
add esp, 8
movzx eax, al
test eax, eax
je 0x405bb4
push 0
lea ecx, [ebp - 0x3c]
call fcn.00401920
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
jl 0x405baf
mov ecx, dword [ebp - 0x230]
movzx edx, word [ecx + 0x1c8]
mov eax, dword [ebp - 0x230]
movzx ecx, word [eax + 0x1ca]
imul edx, ecx
mov eax, dword [ebp - 0x230]
movzx ecx, byte [eax + 0x1cc]
sub ecx, 1
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 1
imul edx, ecx
mov dword [ebp - 0x218], edx
mov edx, dword [ebp - 0x218]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll__lwrite]
mov dword [ebp - 0x21c], eax
mov edx, dword [ebp - 0x214]
push edx
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x405c45
push str..jpg
lea eax, [ebp - 0x30]
push eax
call fcn.004106e0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x405bfc
movzx edx, word [ebp - 0x24]
push edx
movzx eax, word [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x228], esp
lea edx, [ebp - 0x3c]
push edx
call fcn.004111b0
mov dword [ebp - 0x250], eax
call fcn.004131a0
add esp, 0x10
jmp 0x405c45
push str..bmp
lea eax, [ebp - 0x30]
push eax
call fcn.004106e0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x405c45
movzx edx, word [ebp - 0x24]
push edx
movzx eax, word [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x22c], esp
lea edx, [ebp - 0x3c]
push edx
call fcn.004111b0
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x230]
call fcn.00406a40
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x20c]
call fcn.00441494
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x210]
call fcn.004018e0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x30]
call fcn.004018e0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004018e0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004537f9
add esp, 4
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004537f9
add esp, 4
mov dword [ebp - 0x20], 0
push 0
push 0xc8
push 2
mov ecx, dword [ebp - 0x230]
call fcn.00410fd0
push 0
push 0x64
push 3
mov ecx, dword [ebp - 0x230]
call fcn.00410fd0
push 1
push 0x3e8
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
push 1
push 0x452
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f8ff
push 0x452
mov ecx, dword [ebp - 0x230]
call fcn.0043f72c
mov ecx, eax
call fcn.0043f920
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.00452906
mov esp, ebp
pop ebp
ret