Function at 0x405600
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47030b
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x56fda8]
xor eax, ebp
mov dword [ebp - 0x40], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x248], ecx
push 2
mov ecx, dword [ebp - 0x248]
call fcn.004111f0
push 3
mov ecx, dword [ebp - 0x248]
call fcn.004111f0
mov eax, dword [ebp - 0x248]
mov cl, byte [eax + 0x278]
mov byte [ebp - 0x15], cl
mov byte [ebp - 0x29], 0
mov edx, dword [ebp - 0x248]
movzx eax, byte [edx + 0x278]
cmp eax, 2
jne 0x4056aa
push 0
push 0
push str.Camera_is_closed_Please_Open_it.
call fcn.00438b55
push 0
push 0xc8
push 2
mov ecx, dword [ebp - 0x248]
call fcn.004111c0
push 0
push 0x64
push 3
mov ecx, dword [ebp - 0x248]
call fcn.004111c0
jmp 0x405e44
mov ecx, dword [ebp - 0x248]
mov byte [ecx + 0x278], 2
push 0
push 0x3e8
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
push 0
push 0x452
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x405719
push 0xffffffffffffffff
mov eax, dword [ebp - 0x248]
mov ecx, dword [eax + 0x2c8]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x248]
mov eax, dword [edx + 0x2c8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x248]
mov edx, dword [ecx + 0x2cc]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x248]
mov ecx, dword [eax + 0x2cc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x248]
mov ax, word [edx + 0x1c8]
mov word [ebp - 0x28], ax
mov ecx, dword [ebp - 0x248]
mov dx, word [ecx + 0x1ca]
mov word [ebp - 0x24], dx
mov eax, dword [ebp - 0x248]
mov cl, byte [eax + 0x1cc]
mov byte [ebp - 0x16], cl
push 0x474ba8
mov edx, dword [ebp - 0x248]
mov eax, dword [edx + 0x1dc]
push eax
call fcn.004562d0
add esp, 8
test eax, eax
jne 0x40579b
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.00456204
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x405800
push 0
push 0
push 0x474bb0
call fcn.00438b55
push 1
push 0x3e8
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
push 1
push 0x452
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
jmp 0x405e44
mov ecx, dword [ebp - 0x248]
movzx edx, byte [ecx + 0x1cc]
cmp edx, 5
jne 0x40581e
mov dword [ebp - 0x24c], 0x10
jmp 0x40583d
mov eax, dword [ebp - 0x248]
movzx ecx, byte [eax + 0x1cc]
sub ecx, 1
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 1
mov dword [ebp - 0x24c], ecx
mov dl, byte [ebp - 0x24c]
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.00456204
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4058c6
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00456127
add esp, 4
push 0
push 0
push str.Memory_allocate_error_
call fcn.00438b55
push 1
push 0x3e8
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
push 1
push 0x452
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
jmp 0x405e44
mov edx, dword [ebp - 0x10]
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00455980
add esp, 0xc
mov dword [ebp - 0x14], 0
jmp 0x4058ea
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 5
jae 0x405969
mov edx, dword [ebp - 0x248]
movzx eax, byte [edx + 0x1cc]
cmp eax, 5
jne 0x40590e
mov dword [ebp - 0x250], 0x10
jmp 0x40592d
mov ecx, dword [ebp - 0x248]
movzx edx, byte [ecx + 0x1cc]
sub edx, 1
neg edx
sbb edx, edx
neg edx
add edx, 1
mov dword [ebp - 0x250], edx
mov al, byte [ebp - 0x250]
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 - 0x248]
mov ecx, dword [edx + 0x53d4]
call fcn.0041f4b0
test eax, eax
je 0x405964
jmp 0x405969
jmp 0x4058e1
cmp dword [ebp - 0x14], 5
jne 0x405982
push 0
push 0
push str.failed_to_save_
call fcn.00438b55
jmp 0x405db0
mov eax, dword [ebp - 0x248]
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 - 0x248]
mov ecx, dword [eax + 0x53d4]
call fcn.0041f070
mov ecx, dword [ebp - 0x248]
movzx edx, word [ecx + 0x1ca]
push edx
mov eax, dword [ebp - 0x248]
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 - 0x248]
mov ecx, dword [ecx + 0x53d4]
call fcn.00420650
mov edx, dword [ebp - 0x248]
mov al, byte [ebp - 0x15]
mov byte [edx + 0x278], al
movzx ecx, byte [ebp - 0x15]
test ecx, ecx
jne 0x405a43
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [ebp - 0x248]
mov dword [edx + 0x2c8], eax
mov eax, dword [ebp - 0x248]
push eax
push 0
push 0x418880
call fcn.0045606e
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp - 0x248]
mov dword [ecx + 0x2cc], eax
mov edx, dword [ebp - 0x248]
push edx
push 0
push 0x418af0
call fcn.0045606e
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
call fcn.004102a0
lea ecx, [ebp - 0x3c]
call fcn.00411350
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00410450
push eax
lea ecx, [ebp - 0x38]
call fcn.00410410
push eax
lea ecx, [ebp - 0x38]
call fcn.004103d0
push eax
lea ecx, [ebp - 0x38]
call fcn.00410390
push eax
lea ecx, [ebp - 0x38]
call fcn.004102e0
push eax
push str.P_02d_02d_02d_02d_02d
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004115c0
add esp, 0x1c
lea ecx, [ebp - 0x30]
call fcn.00411350
mov byte [ebp - 4], 1
push str.Jpeg_File_.jpg_.jpgBitmap_File_.bmp_.bmpRaw_File_.raw_.raw
lea ecx, [ebp - 0x228]
call fcn.00401870
mov byte [ebp - 4], 2
push 1
push 0
push 0
lea ecx, [ebp - 0x228]
call fcn.00401d50
push eax
push 6
lea ecx, [ebp - 0x3c]
call fcn.00401d50
push eax
push 0
push 0
lea ecx, [ebp - 0x224]
call fcn.004422ad
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x224]
call fcn.00442a98
cmp eax, 1
jne 0x405d77
lea edx, [ebp - 0x238]
push edx
lea ecx, [ebp - 0x224]
call fcn.00442bc4
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x258], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x258]
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00411390
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x238]
call fcn.004018f0
lea ecx, [ebp - 0x224]
call fcn.004419e8
movzx edx, word [eax + 0x3a]
test edx, edx
jne 0x405bee
lea ecx, [ebp - 0x224]
call fcn.004419e8
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x25c], 1
je 0x405bb7
cmp dword [ebp - 0x25c], 2
je 0x405bc6
cmp dword [ebp - 0x25c], 3
je 0x405bd5
jmp 0x405be2
push 0x474c50
lea ecx, [ebp - 0x30]
call fcn.00401910
jmp 0x405be2
push 0x474c58
lea ecx, [ebp - 0x30]
call fcn.00401910
jmp 0x405be2
push 0x474c60
lea ecx, [ebp - 0x30]
call fcn.00401910
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00410500
push 4
lea edx, [ebp - 0x23c]
push edx
lea ecx, [ebp - 0x3c]
call fcn.004107c0
mov dword [ebp - 0x260], eax
mov eax, dword [ebp - 0x260]
mov dword [ebp - 0x264], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x264]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00411390
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x23c]
call fcn.004018f0
lea ecx, [ebp - 0x30]
call fcn.00410540
push str..raw
lea edx, [ebp - 0x30]
push edx
call fcn.00410ad0
add esp, 8
movzx eax, al
test eax, eax
je 0x405ce6
push 0
lea ecx, [ebp - 0x3c]
call fcn.00401d50
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jl 0x405ce1
mov ecx, dword [ebp - 0x248]
movzx edx, word [ecx + 0x1c8]
mov eax, dword [ebp - 0x248]
movzx ecx, word [eax + 0x1ca]
imul edx, ecx
mov eax, dword [ebp - 0x248]
movzx ecx, byte [eax + 0x1cc]
sub ecx, 1
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 1
imul edx, ecx
mov dword [ebp - 0x230], edx
mov edx, dword [ebp - 0x230]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll__lwrite]
mov dword [ebp - 0x234], eax
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x405d77
push str..jpg
lea eax, [ebp - 0x30]
push eax
call fcn.00410ad0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x405d2e
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 - 0x240], esp
lea edx, [ebp - 0x3c]
push edx
call fcn.00411370
mov dword [ebp - 0x268], eax
call fcn.004133a0
add esp, 0x10
jmp 0x405d77
push str..bmp
lea eax, [ebp - 0x30]
push eax
call fcn.00410ad0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x405d77
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 - 0x244], esp
lea edx, [ebp - 0x3c]
push edx
call fcn.00411370
mov dword [ebp - 0x26c], eax
mov ecx, dword [ebp - 0x248]
call fcn.00406b70
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x224]
call fcn.004420f5
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x228]
call fcn.004018f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x30]
call fcn.004018f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004018f0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00456127
add esp, 4
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00456127
add esp, 4
mov dword [ebp - 0x20], 0
push 0
push 0xc8
push 2
mov ecx, dword [ebp - 0x248]
call fcn.004111c0
push 0
push 0x64
push 3
mov ecx, dword [ebp - 0x248]
call fcn.004111c0
push 1
push 0x3e8
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
push 1
push 0x452
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffc7
push 0x452
mov ecx, dword [ebp - 0x248]
call fcn.0043fdcf
mov ecx, eax
call fcn.0043ffee
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.00455303
mov esp, ebp
pop ebp
ret