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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46cf40
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x557834]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0x53d4], 0
jne 0x40e8a4
xor eax, eax
jmp 0x40eefa
push 1
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041ed00
cmp dword [ebp + 0x10], 0
je 0x40e91b
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 5]
and eax, 1
neg eax
sbb eax, eax
neg eax
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a3c0
push 1
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 5]
xor eax, 2
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a1f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
mov edx, dword [ebp + 8]
mov al, byte [edx + 5]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a1f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a430
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 1
je 0x40e944
mov eax, dword [ebp - 0x14]
jmp 0x40eefa
cmp dword [ebp + 0x10], 1
jne 0x40edf8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x1f4
jbe 0x40e96c
mov dword [ebp - 0x38], 0
jmp 0x40e977
mov ecx, dword [ebp - 0x34]
call fcn.004061e0
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x18], edx
mov eax, dword [0x4ca1a0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004535f0
add esp, 8
test eax, eax
je 0x40e9b3
mov eax, dword [str.GC0101]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004535f0
add esp, 8
test eax, eax
jne 0x40eb20
mov eax, dword [ebp + 8]
mov cl, byte [eax + 7]
push ecx
push 0
push 0xf0
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a0f0
mov edx, dword [ebp + 8]
mov al, byte [edx + 7]
push eax
push 0xaa
push 0xfc
mov ecx, dword [ebp + 8]
movzx dx, byte [ecx + 6]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a0f0
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 7]
push edx
push 0xaa
push 0xfd
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a0f0
mov eax, dword [ebp + 8]
mov cl, byte [eax + 7]
push ecx
push 0xaa
push 0xfe
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a0f0
mov edx, dword [ebp + 8]
mov al, byte [edx + 7]
push eax
lea ecx, [ebp - 0x24]
push ecx
push 0xfc
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a170
mov edx, dword [ebp + 8]
mov al, byte [edx + 7]
push eax
lea ecx, [ebp - 0x20]
push ecx
push 0xfd
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a170
mov edx, dword [ebp + 8]
mov al, byte [edx + 7]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0xfe
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a170
movzx edx, word [ebp - 0x24]
cmp edx, 0xaa
jne 0x40eb03
movzx eax, word [ebp - 0x20]
cmp eax, 0xaa
jne 0x40eb03
movzx ecx, word [ebp - 0x1c]
cmp ecx, 0xaa
jne 0x40eb03
push 0x2c
push 0x4cb2ac
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00452c10
add esp, 0xc
jmp 0x40eb1b
push 0x2c
push 0x4ca18c
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00452c10
add esp, 0xc
jmp 0x40ecdb
mov ecx, dword [str.OV7673H]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004535f0
add esp, 8
test eax, eax
je 0x40eb58
mov ecx, dword [str.OV7675]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004535f0
add esp, 8
test eax, eax
jne 0x40ec04
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 7]
push edx
push 0x80
push 0x12
mov eax, dword [ebp + 8]
movzx cx, byte [eax + 6]
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041a0f0
mov eax, dword [ebp + 8]
mov cl, byte [eax + 7]
push ecx
push 0x7a
push 0x1a
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a0f0
mov edx, dword [ebp + 8]
mov al, byte [edx + 7]
push eax
lea ecx, [ebp - 0x24]
push ecx
push 0x1a
mov edx, dword [ebp + 8]
movzx ax, byte [edx + 6]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041a170
movzx edx, word [ebp - 0x24]
cmp edx, 0x7b
jne 0x40ebe6
push 0x2c
push 0x490b2c
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00452c10
add esp, 0xc
jmp 0x40ebff
push 0x2c
push 0x490ad4
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
push ecx
call fcn.00452c10
add esp, 0xc
jmp 0x40ecdb
mov edx, dword [str.PAS6167_Serial]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.004535f0
add esp, 8
test eax, eax
je 0x40ec3c
mov edx, dword [str.PAS6175_SPI]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.004535f0
add esp, 8
test eax, eax
jne 0x40ecc3
mov edx, dword [ebp + 8]
mov al, byte [edx + 7]
push eax
push 0
push 0xef
mov ecx, dword [ebp + 8]
movzx dx, byte [ecx + 6]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a0f0
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 7]
push edx
lea eax, [ebp - 0x24]
push eax
push 1
mov ecx, dword [ebp + 8]
movzx dx, byte [ecx + 6]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53d4]
call fcn.0041a170
movzx ecx, word [ebp - 0x24]
cmp ecx, 0x65
jne 0x40eca9
push 0x2c
push 0x4f67ec
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00452c10
add esp, 0xc
jmp 0x40ecc1
push 0x2c
push 0x4f299c
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00452c10
add esp, 0xc
jmp 0x40ecdb
push 0x2c
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00452c10
add esp, 0xc
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
mov dword [ebp + 8], eax
cmp dword [ebp - 0x18], 0
je 0x40ecfb
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx + 0x1ef]
mov dword [ebp - 0x3c], edx
jmp 0x40ed02
mov dword [ebp - 0x3c], 2
mov eax, dword [ebp + 8]
mov cl, byte [ebp - 0x3c]
mov byte [eax + 0x27], cl
lea ecx, [ebp - 0x28]
call fcn.00411090
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.00401d80
mov byte [ebp - 0x29], 0
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x34]
mov ecx, dword [edx + 0x114]
or ecx, dword [eax + 0x118]
je 0x40edcf
mov dl, byte [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x118]
push ecx
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0x114]
push eax
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041e500
mov byte [ebp - 0x29], al
movzx eax, byte [ebp - 0x29]
test eax, eax
je 0x40edcf
movzx ecx, byte [ebp - 0x29]
cmp ecx, 3
jne 0x40ed95
push 0x472bb4
lea edx, [ebp - 0x28]
push edx
call fcn.004112c0
add esp, 8
jmp 0x40edc2
movzx eax, byte [ebp - 0x29]
cmp eax, 1
jne 0x40edb1
push 0x472bd0
lea ecx, [ebp - 0x28]
push ecx
call fcn.004112c0
add esp, 8
jmp 0x40edc2
push 0x472be4
lea edx, [ebp - 0x28]
push edx
call fcn.004112c0
add esp, 8
push 0x32
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Beep]
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
lea eax, [ebp - 0x28]
push eax
call fcn.004110b0
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x34]
call fcn.004043a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004018f0
push 0x2c
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
push ecx
mov edx, dword [ebp + 0xc]
imul edx, edx, 0x2c
mov eax, dword [ebp - 0x34]
lea ecx, [eax + edx + 0x1f4]
push ecx
call fcn.00452c10
add esp, 0xc
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x10e]
cmp eax, 3
jl 0x40ee3a
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1f2]
mov byte [ebp - 0x41], dl
jmp 0x40ee46
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x10e]
mov byte [ebp - 0x41], cl
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x10d]
cmp eax, 3
jl 0x40ee63
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1f1]
mov byte [ebp - 0x42], dl
jmp 0x40ee6f
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x10d]
mov byte [ebp - 0x42], cl
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x10c]
cmp eax, 3
jl 0x40ee8c
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1f0]
mov byte [ebp - 0x43], dl
jmp 0x40ee98
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + 0x10c]
mov byte [ebp - 0x43], cl
mov dl, byte [ebp - 0x41]
push edx
mov al, byte [ebp - 0x42]
push eax
mov cl, byte [ebp - 0x43]
push ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53d4]
call fcn.0041e440
mov eax, dword [ebp - 0x34]
movzx ecx, byte [eax + 0x10f]
cmp ecx, 3
jl 0x40eecf
mov edx, dword [ebp - 0x34]
mov al, byte [edx + 0x1ef]
mov byte [ebp - 0x44], al
jmp 0x40eedb
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x10f]
mov byte [ebp - 0x44], dl
mov al, byte [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53d4]
call fcn.0041ae40
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