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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e24f
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x478a70]
xor eax, ebp
mov dword [ebp - 0x30], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x84], ecx
mov eax, dword [ebp - 0x84]
cmp dword [eax + 0x734], 0
je 0x40cfb7
xor al, al
jmp 0x40d4cd
mov ecx, dword [ebp - 0x84]
mov byte [ecx + 0x61e], 1
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx]
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 1]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 2]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 3]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 4]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 5]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 6]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 7]
add eax, edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 8]
add eax, edx
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 9], al
movzx edx, byte [ebp + 8]
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax]
and ecx, 0x3f
cmp edx, ecx
je 0x40d038
xor al, al
jmp 0x40d4cd
mov edx, dword [ebp - 0x84]
mov byte [edx + 0x60e], 0
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x60f], 0
mov ecx, dword [ebp - 0x84]
mov edx, dword [ebp + 0xc]
mov al, byte [edx]
mov byte [ecx + 0x610], al
mov ecx, dword [ebp - 0x84]
mov byte [ecx + 0x611], 0
mov edx, dword [ebp - 0x84]
mov byte [edx + 0x612], 0
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x613], 0xc
mov ecx, dword [ebp - 0x84]
mov byte [ecx + 0x614], 0x45
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 1]
mov byte [edx + 0x615], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 2]
mov byte [edx + 0x616], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 3]
mov byte [edx + 0x617], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 4]
mov byte [edx + 0x618], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 5]
mov byte [edx + 0x619], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 6]
mov byte [edx + 0x61a], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 7]
mov byte [edx + 0x61b], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 8]
mov byte [edx + 0x61c], cl
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 9]
mov byte [edx + 0x61d], cl
push ecx
mov ecx, esp
mov dword [ebp - 0x5c], esp
push str.PC_send_to_sn11220_Data_..._n
call fcn.00401340
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
push 0xa
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp - 0x84]
call fcn.00409bf0
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x620], 0
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
or edx, 0x80
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x62b], dl
push 0x10
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x84]
movzx eax, byte [edx + 0x62b]
push eax
call fcn.0041dbb0
add esp, 0xc
push 0x10
mov ecx, dword [ebp - 0x84]
add ecx, 0x60e
push ecx
call dword [0x47a58c]
mov dword [ebp - 0x4c], eax
push ecx
mov ecx, esp
mov dword [ebp - 0x60], esp
push 0x463cc0
call fcn.00401340
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
push ecx
mov ecx, esp
mov dword [ebp - 0x64], esp
lea edx, [ebp - 0x44]
push edx
call fcn.00401340
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
lea ecx, [ebp - 0x50]
call fcn.00402a90
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 1]
push edx
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax]
push ecx
push 0x463ce0
lea edx, [ebp - 0x50]
push edx
call fcn.004023e0
add esp, 0x14
mov dword [ebp - 0x54], 0
jmp 0x40d24a
mov eax, dword [ebp - 0x54]
add eax, 1
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0x10
jge 0x40d262
mov ecx, dword [ebp - 0x84]
add ecx, dword [ebp - 0x54]
mov byte [ecx + 0x60e], 0
jmp 0x40d241
push ecx
mov ecx, esp
mov dword [ebp - 0x68], esp
push str._start_send
call fcn.00401340
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x58], 0
jmp 0x40d2a4
mov eax, dword [ebp - 0x58]
add eax, 1
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0x14
jge 0x40d436
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0
push 0
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40d2e0
lea edx, [ebp - 0x28]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x84]
movzx edx, byte [ecx + 0x620]
test edx, edx
je 0x40d2ff
jmp 0x40d305
cmp dword [ebp - 0x48], 5
jb 0x40d2ae
mov eax, dword [ebp - 0x84]
movzx ecx, byte [eax + 0x620]
test ecx, ecx
je 0x40d431
mov edx, dword [ebp - 0x84]
movzx eax, byte [edx + 0x5fe]
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
or edx, 0x80
cmp eax, edx
je 0x40d398
cmp dword [ebp - 0x58], 0xa
jle 0x40d393
push 0x10
mov eax, dword [ebp - 0x84]
add eax, 0x60e
push eax
call dword [0x47a58c]
mov ecx, dword [ebp - 0x84]
mov byte [ecx + 0x620], 0
mov edx, dword [ebp - 0x84]
mov byte [edx + 0x61e], 0
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x62b], 0
mov byte [ebp - 0x69], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004013c0
mov al, byte [ebp - 0x69]
jmp 0x40d4cd
jmp 0x40d431
push 0x10
mov ecx, dword [ebp - 0x84]
add ecx, 0x60e
push ecx
call dword [0x47a58c]
push ecx
mov ecx, esp
mov dword [ebp - 0x70], esp
push str._send_back_00_sendcmd
call fcn.00401340
mov dword [ebp - 0x98], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
mov edx, dword [ebp - 0x84]
mov byte [edx + 0x620], 0
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x61e], 0
push ecx
mov ecx, esp
mov dword [ebp - 0x74], esp
push str._send_ok
call fcn.00401340
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
mov ecx, dword [ebp - 0x84]
mov byte [ecx + 0x62b], 0
mov byte [ebp - 0x75], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004013c0
mov al, byte [ebp - 0x75]
jmp 0x40d4cd
jmp 0x40d29b
push ecx
mov ecx, esp
mov dword [ebp - 0x7c], esp
push str._stop_send
call fcn.00401340
mov dword [ebp - 0xa0], eax
mov ecx, dword [ebp - 0x84]
call fcn.00409b40
mov edx, dword [ebp - 0x84]
movzx eax, byte [edx + 0x620]
test eax, eax
jne 0x40d4b7
push 0x10
mov ecx, dword [ebp - 0x84]
add ecx, 0x60e
push ecx
call dword [0x47a58c]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x84]
mov byte [edx + 0x620], 0
mov eax, dword [ebp - 0x84]
mov byte [eax + 0x61e], 0
mov byte [ebp - 0x7d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004013c0
mov al, byte [ebp - 0x7d]
jmp 0x40d4cd
mov byte [ebp - 0x7e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004013c0
mov al, byte [ebp - 0x7e]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.0044240e
mov esp, ebp
pop ebp
ret 8