Function at 0x40e9c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x470a60
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x56fda8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], ecx
cmp dword [ebp + 0xc], 1
jge 0x40e9f6
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
jmp 0x40e9fd
mov dword [ebp - 0x38], 1
cmp dword [ebp - 0x38], 0
jle 0x40ea20
cmp dword [ebp + 0xc], 1
jge 0x40ea11
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x3c], ecx
jmp 0x40ea18
mov dword [ebp - 0x3c], 1
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], edx
jmp 0x40ea27
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x34]
cmp dword [ecx + 0x53d4], 0
jne 0x40ea49
xor eax, eax
jmp 0x40f0e7
push 1
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041eea0
cmp dword [ebp + 0x10], 0
je 0x40eac1
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 5]
and ecx, 1
neg ecx
sbb ecx, ecx
neg ecx
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a610
push 1
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 5]
xor ecx, 2
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a440
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 5]
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a440
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a680
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 1
je 0x40eaea
mov eax, dword [ebp - 0x14]
jmp 0x40f0e7
cmp dword [ebp + 0x10], 1
jne 0x40efe2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x1f4
jbe 0x40eb12
mov dword [ebp - 0x44], 0
jmp 0x40eb1d
mov ecx, dword [ebp - 0x34]
call fcn.00406240
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x4d29a0]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004562d0
add esp, 8
test eax, eax
je 0x40eb5b
mov ecx, dword [str.GC0101]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004562d0
add esp, 8
test eax, eax
jne 0x40ece5
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
push 0
push 0xf0
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a340
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
push 0xaa
push 0xfc
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a340
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
push 0xaa
push 0xfd
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a340
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
push 0xaa
push 0xfe
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a340
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
lea eax, [ebp - 0x24]
push eax
push 0xfc
mov ecx, dword [ebp + 8]
movzx dx, byte [ecx + 6]
movzx eax, dx
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a3c0
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 7]
push eax
lea ecx, [ebp - 0x20]
push ecx
push 0xfd
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
movzx ecx, ax
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a3c0
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 7]
push ecx
lea edx, [ebp - 0x1c]
push edx
push 0xfe
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a3c0
movzx ecx, word [ebp - 0x24]
cmp ecx, 0xaa
jne 0x40ecc7
movzx edx, word [ebp - 0x20]
cmp edx, 0xaa
jne 0x40ecc7
movzx eax, word [ebp - 0x1c]
cmp eax, 0xaa
jne 0x40ecc7
push 0x2c
push 0x4d38ec
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
push ecx
call fcn.00455a00
add esp, 0xc
jmp 0x40ece0
push 0x2c
push 0x4d298c
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00455a00
add esp, 0xc
jmp 0x40eeb1
mov eax, dword [str.OV7673H]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004562d0
add esp, 8
test eax, eax
je 0x40ed1b
mov eax, dword [str.OV7675]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004562d0
add esp, 8
test eax, eax
jne 0x40edd3
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 7]
push ecx
push 0x80
push 0x12
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
movzx ecx, ax
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a340
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 7]
push ecx
push 0x7a
push 0x1a
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
movzx ecx, ax
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a340
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 7]
push ecx
lea edx, [ebp - 0x24]
push edx
push 0x1a
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a3c0
movzx ecx, word [ebp - 0x24]
cmp ecx, 0x7b
jne 0x40edb6
push 0x2c
push 0x4974c4
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00455a00
add esp, 0xc
jmp 0x40edce
push 0x2c
push 0x4971b8
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00455a00
add esp, 0xc
jmp 0x40eeb1
mov ecx, dword [str.PAS6167_Serial]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004562d0
add esp, 8
test eax, eax
je 0x40ee0b
mov ecx, dword [str.PAS6175_SPI]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004562d0
add esp, 8
test eax, eax
jne 0x40ee9a
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
push 0
push 0xef
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
movzx edx, cx
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a340
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 7]
push edx
lea eax, [ebp - 0x24]
push eax
push 1
mov ecx, dword [ebp + 8]
movzx dx, byte [ecx + 6]
movzx eax, dx
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a3c0
movzx edx, word [ebp - 0x24]
cmp edx, 0x65
jne 0x40ee7f
push 0x2c
push 0x502034
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00455a00
add esp, 0xc
jmp 0x40ee98
push 0x2c
push 0x4fe944
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
push ecx
call fcn.00455a00
add esp, 0xc
jmp 0x40eeb1
push 0x2c
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00455a00
add esp, 0xc
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
mov dword [ebp + 8], ecx
cmp dword [ebp - 0x18], 0
je 0x40eed2
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x1ef]
mov dword [ebp - 0x48], eax
jmp 0x40eed9
mov dword [ebp - 0x48], 2
mov ecx, dword [ebp + 8]
mov dl, byte [ebp - 0x48]
mov byte [ecx + 0x27], dl
lea ecx, [ebp - 0x28]
call fcn.00411350
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.00401d60
mov byte [ebp - 0x29], 0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x34]
mov edx, dword [eax + 0x114]
or edx, dword [ecx + 0x118]
je 0x40efb9
movzx eax, byte [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0x118]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x114]
push ecx
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041e700
mov byte [ebp - 0x29], al
movzx ecx, byte [ebp - 0x29]
test ecx, ecx
je 0x40efb9
movzx edx, byte [ebp - 0x29]
cmp edx, 3
jne 0x40ef6d
push 0x475bc4
lea eax, [ebp - 0x28]
push eax
call fcn.004115c0
add esp, 8
jmp 0x40ef9a
movzx ecx, byte [ebp - 0x29]
cmp ecx, 1
jne 0x40ef89
push 0x475be0
lea edx, [ebp - 0x28]
push edx
call fcn.004115c0
add esp, 8
jmp 0x40ef9a
push 0x475bf4
lea eax, [ebp - 0x28]
push eax
call fcn.004115c0
add esp, 8
push 0x32
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Beep]
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.00401d50
push eax
call fcn.00438b55
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
lea edx, [ebp - 0x28]
push edx
call fcn.00411370
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x34]
call fcn.004043d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004018f0
push 0x2c
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
mov ecx, dword [ebp + 0xc]
imul ecx, ecx, 0x2c
mov edx, dword [ebp - 0x34]
lea eax, [edx + ecx + 0x1f4]
push eax
call fcn.00455a00
add esp, 0xc
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx + 0x10e]
cmp edx, 3
jl 0x40f023
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x1f2]
mov byte [ebp - 0x4d], cl
jmp 0x40f02f
mov edx, dword [ebp - 0x34]
mov al, byte [edx + 0x10e]
mov byte [ebp - 0x4d], al
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx + 0x10d]
cmp edx, 3
jl 0x40f04c
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x1f1]
mov byte [ebp - 0x4e], cl
jmp 0x40f058
mov edx, dword [ebp - 0x34]
mov al, byte [edx + 0x10d]
mov byte [ebp - 0x4e], al
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx + 0x10c]
cmp edx, 3
jl 0x40f075
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x1f0]
mov byte [ebp - 0x4f], cl
jmp 0x40f081
mov edx, dword [ebp - 0x34]
mov al, byte [edx + 0x10c]
mov byte [ebp - 0x4f], al
movzx ecx, byte [ebp - 0x4d]
push ecx
movzx edx, byte [ebp - 0x4e]
push edx
movzx eax, byte [ebp - 0x4f]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041e630
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x10f]
cmp eax, 3
jl 0x40f0bb
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1ef]
mov byte [ebp - 0x50], dl
jmp 0x40f0c7
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x10f]
mov byte [ebp - 0x50], cl
movzx edx, byte [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041b0b0
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 0xc