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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46d2f0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x52e4bc]
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 + 0x53c4], 0
jne 0x40ec84
xor eax, eax
jmp 0x40f320
push 1
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53c4]
call fcn.0041f0f0
cmp dword [ebp + 0x10], 0
je 0x40ecfc
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 5]
and eax, 1
neg eax
sbb eax, eax
and eax, 3
push eax
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53c4]
call fcn.0041a4c0
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 + 0x53c4]
call fcn.0041a2f0
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 + 0x53c4]
call fcn.0041a2f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0x53c4]
call fcn.0041b070
movzx eax, ax
cmp eax, 0x32a
jge 0x40ed31
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53c4]
call fcn.0041a7f0
mov dword [ebp - 0x14], eax
jmp 0x40ed4c
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0x53c4]
call fcn.0041a530
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 1
je 0x40ed6a
push 0
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx + 0x53c4]
call fcn.0041f0f0
mov eax, dword [ebp - 0x14]
jmp 0x40f320
cmp dword [ebp + 0x10], 1
jne 0x40f21e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x1f4
jbe 0x40ed92
mov dword [ebp - 0x38], 0
jmp 0x40ed9d
mov ecx, dword [ebp - 0x34]
call fcn.00406120
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x18], edx
mov eax, dword [0x4c1218]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004539a0
add esp, 8
test eax, eax
je 0x40edd9
mov eax, dword [str.GC0101]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004539a0
add esp, 8
test eax, eax
jne 0x40ef46
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a270
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 + 0x53c4]
call fcn.0041a270
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 + 0x53c4]
call fcn.0041a270
movzx edx, word [ebp - 0x24]
cmp edx, 0xaa
jne 0x40ef29
movzx eax, word [ebp - 0x20]
cmp eax, 0xaa
jne 0x40ef29
movzx ecx, word [ebp - 0x1c]
cmp ecx, 0xaa
jne 0x40ef29
push 0x2c
push 0x4c2324
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00452fc0
add esp, 0xc
jmp 0x40ef41
push 0x2c
push 0x4c1204
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00452fc0
add esp, 0xc
jmp 0x40f101
mov ecx, dword [str.OV7673H]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004539a0
add esp, 8
test eax, eax
je 0x40ef7e
mov ecx, dword [str.OV7675]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call fcn.004539a0
add esp, 8
test eax, eax
jne 0x40f02a
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a270
movzx edx, word [ebp - 0x24]
cmp edx, 0x7b
jne 0x40f00c
push 0x2c
push 0x48f20c
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00452fc0
add esp, 0xc
jmp 0x40f025
push 0x2c
push 0x48ef00
mov ecx, dword [ebp - 0x34]
add ecx, 0x1c8
push ecx
call fcn.00452fc0
add esp, 0xc
jmp 0x40f101
mov edx, dword [str.PAS6167_Serial]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.004539a0
add esp, 8
test eax, eax
je 0x40f062
mov edx, dword [str.PAS6175_SPI]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.004539a0
add esp, 8
test eax, eax
jne 0x40f0e9
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 + 0x53c4]
call fcn.0041a1f0
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 + 0x53c4]
call fcn.0041a270
movzx ecx, word [ebp - 0x24]
cmp ecx, 0x65
jne 0x40f0cf
push 0x2c
push 0x4e4dfc
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00452fc0
add esp, 0xc
jmp 0x40f0e7
push 0x2c
push 0x4e0fac
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
push eax
call fcn.00452fc0
add esp, 0xc
jmp 0x40f101
push 0x2c
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x34]
add edx, 0x1c8
push edx
call fcn.00452fc0
add esp, 0xc
mov eax, dword [ebp - 0x34]
add eax, 0x1c8
mov dword [ebp + 8], eax
cmp dword [ebp - 0x18], 0
je 0x40f121
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx + 0x1ef]
mov dword [ebp - 0x3c], edx
jmp 0x40f128
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.00411190
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.00401d70
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 0x40f1f5
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 + 0x53c4]
call fcn.0041e890
mov byte [ebp - 0x29], al
movzx eax, byte [ebp - 0x29]
test eax, eax
je 0x40f1f5
movzx ecx, byte [ebp - 0x29]
cmp ecx, 3
jne 0x40f1bb
push str.__RESET___PWDN_PIN_ERROR_
lea edx, [ebp - 0x28]
push edx
call fcn.004113c0
add esp, 8
jmp 0x40f1e8
movzx eax, byte [ebp - 0x29]
cmp eax, 1
jne 0x40f1d7
push str.__PWDN_PIN_ERROR
lea ecx, [ebp - 0x28]
push ecx
call fcn.004113c0
add esp, 8
jmp 0x40f1e8
push str.__RESET_PIN_ERROR
lea edx, [ebp - 0x28]
push edx
call fcn.004113c0
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.004111b0
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x34]
call fcn.00404390
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004018e0
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.00452fc0
add esp, 0xc
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x10e]
cmp eax, 3
jl 0x40f260
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1f2]
mov byte [ebp - 0x41], dl
jmp 0x40f26c
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 0x40f289
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1f1]
mov byte [ebp - 0x42], dl
jmp 0x40f295
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 0x40f2b2
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 0x1f0]
mov byte [ebp - 0x43], dl
jmp 0x40f2be
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 + 0x53c4]
call fcn.0041e7d0
mov eax, dword [ebp - 0x34]
movzx ecx, byte [eax + 0x10f]
cmp ecx, 3
jl 0x40f2f5
mov edx, dword [ebp - 0x34]
mov al, byte [edx + 0x1ef]
mov byte [ebp - 0x44], al
jmp 0x40f301
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 + 0x53c4]
call fcn.0041b1e0
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