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

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x18]
xor ebx, ebx
push esi
push edi
mov eax, dword [ebp]
mov dword [esp + 0x10], ebx
cmp eax, 4
mov dword [esp + 0x14], ebx
jne 0x40c795
mov eax, dword [ebp + 0x30]
mov dword [0x479d30], eax
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
cmp edi, ebx
jbe 0x40c7ab
push edi
push esi
call fcn.0040c670
add esp, 8
call fcn.004078c0
cmp al, 1
jne 0x40c7bc
test edi, edi
ja 0x40c960
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test edi, edi
mov dword [esp + 0x1c], eax
jbe 0x40c7e2
mov edx, dword [0x479d30]
mov ecx, ebx
and ecx, 0xffff
push edi
push ecx
push edx
push str.Tx_Swath_d__d__size:_d
jmp 0x40c7f9
mov edx, dword [ebp]
mov eax, ebx
and eax, 0xffff
xor ecx, ecx
mov cl, byte [esi + 3]
push eax
push ecx
push edx
push str.Tx_Cmm__d__X__d_
call fcn.00407650
mov eax, dword [esp + 0x34]
mov ecx, dword [esi + 0x14]
add esp, 0x10
push 0
push eax
push ebp
push ecx
call fcn.0040c630
add esp, 0x10
test eax, eax
je 0x40c908
test edi, edi
jbe 0x40c83d
mov edx, dword [esp + 0x28]
mov eax, dword [esi + 0x14]
push 1
push edi
push edx
push eax
call fcn.0040c630
add esp, 0x10
test eax, eax
je 0x40c917
lea ecx, [esp + 0x2c]
push ecx
push 0xbb8
push 0x479174
push esi
call fcn.0040c650
mov bl, al
add esp, 0x10
test bl, bl
je 0x40c8e7
mov edx, dword [0x479d30]
mov eax, dword [esp + 0x2c]
push edx
push eax
push 0x479174
push esi
call fcn.0040c3e0
mov byte [esp + 0x30], al
add esp, 0x10
mov eax, dword [esp + 0x20]
and eax, 0xff
cmp eax, 3
ja case.default.0x40c88b
jmp dword [eax*4 + 0x40ca00]
push 1
call fcn.00408310
mov ecx, dword [esi + 0xc]
add esp, 4
cmp dword [ecx], 1
jne 0x40c8ae
cmp dword [ebp], 5
jne 0x40c9c3
cmp dword [ebp], 4
jne case.default.0x40c88b
push edi
push esi
call fcn.0040c670
add esp, 8
cmp byte [esp + 0x20], 4
jne 0x40c8f4
lea edx, [esp + 0x2c]
push edx
push 0xbb8
push 0x479174
push esi
call fcn.0040c650
mov bl, al
add esp, 0x10
test bl, bl
jne 0x40c85f
push str.Rec_fail__n
call fcn.00407650
add esp, 4
test bl, bl
je 0x40c926
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
mov ebx, eax
jmp 0x40c7ab
push str.send_CMM__fail__n
call fcn.00407650
add esp, 4
jmp 0x40c92a
push str.send_DATA__fail__n
call fcn.00407650
add esp, 4
jmp 0x40c92a
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, ecx
inc ecx
push eax
push esi
mov dword [esp + 0x1c], ecx
call fcn.0040c330
add esp, 8
test eax, eax
je 0x40c9e1
mov eax, dword [esp + 0x14]
and eax, 0xffff
push eax
push 0x42b6e4
call fcn.00407650
jmp 0x40c7a8
push str.Tx_swathing..._bur_quit_
call fcn.00407650
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
test edi, edi
jbe 0x40c99f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [esp + 0x1c]
mov ecx, dword [0x479d30]
sub eax, edi
push eax
push ecx
push str.Swath_03d_sended:_d
call fcn.00407650
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
push 0x42b6a0
call fcn.00407650
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov edx, dword [ebp]
push edx
push str.Sending_cmm_d__but
call fcn.00407650
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 0x42b670
call fcn.00407650
push 0x11
call fcn.00407920
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret