Function at 0x401750
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, ecx
mov dword [ebp - 0xc], 0
push esi
push edi
xor edi, edi
mov esi, 6
mov eax, dword [ebx + 0x18]
mov edx, dword [ebx + 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], esi
cmp edx, eax
jl 0x401844
mov eax, dword [ebx + 0x10]
xorps xmm0, xmm0
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 4], esi
mov eax, dword [eax]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
movq qword [ecx], xmm0
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
push 0
push esi
push 0x400
mov ecx, dword [eax + 4]
push dword [ebp - 0x18]
mov dword [ebp - 0x24], edx
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov esi, eax
test esi, esi
jne 0x4017f3
mov ecx, dword [ebp - 0x1c]
sub ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
sbb esi, dword [ebp - 0x28]
cdq
cmp esi, edx
mov esi, dword [ebp - 4]
jb 0x4017a7
ja 0x4017ec
cmp ecx, eax
jb 0x4017a7
xor esi, esi
mov dword [ebp - 4], esi
jmp 0x4017fe
mov dword [ebp - 4], esi
test esi, esi
js 0x401909
cmp dword [ebx + 0x28], 2
jl 0x401837
push esi
push str.recv___d_:_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push esi
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov edx, dword [ebx + 8]
add esp, 4
mov ecx, eax
call fcn.00401130
add esp, 4
xor edx, edx
test esi, esi
mov esi, dword [ebp - 0x10]
je 0x4019eb
mov eax, dword [ebx + 8]
mov cl, byte [edx + eax]
inc edx
test byte [ebx + 0x14], 2
movzx eax, cl
je 0x4018bb
cmp dword [ebp - 0xc], 0
je 0x401868
cmp cl, 0x5e
je 0x40189a
cmp cl, 0x5d
jne 0x40192b
cmp cl, 0x7e
jne 0x40188c
cmp dword [ebp - 8], 0
jne 0x40187c
mov dword [ebp - 8], 1
jmp 0x4018e3
test edi, edi
jne 0x40194d
mov eax, dword [ebp - 4]
jmp 0x401778
cmp cl, 0x7d
jne 0x40189a
mov dword [ebp - 0xc], 0x20
jmp 0x4018e3
cmp dword [ebp - 8], 0
mov eax, dword [ebp - 4]
je 0x401778
cmp edi, esi
jge 0x4019a4
xor cl, byte [ebp - 0xc]
mov dword [ebp - 0xc], 0
jmp 0x4018dd
cmp dword [ebp - 8], 0
jne 0x4018d5
cmp cl, 0x7e
jne 0x4018d5
mov eax, dword [ebp - 4]
mov dword [ebp - 8], 1
jmp 0x401778
cmp edi, esi
je 0x4019c5
mov eax, dword [ebx]
mov byte [edi + eax], cl
inc edi
mov eax, dword [ebp - 4]
cmp edi, 4
jne 0x401778
mov eax, dword [ebx]
movzx esi, byte [eax + 2]
movzx eax, byte [eax + 3]
shl esi, 8
or esi, eax
mov eax, dword [ebp - 4]
add esi, 6
jmp 0x401775
push esi
push str.usb_recv_failed__ret___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push eax
push str.unexpected_escaped_byte__0x_02x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp edi, esi
jge 0x401972
push str.recieved_message_too_short_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov eax, dword [ebp - 4]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
mov dword [ebx + 0x20], edi
cmp edi, 6
jl 0x401951
cmp edi, esi
je 0x401a04
push esi
push edi
push str.bad_length___d__expected__d__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0x10
jmp 0x40196a
push str.recieved_message_too_long_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp cl, 0x7e
je 0x4019eb
push str.expected_end_of_message_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov eax, dword [ebp - 4]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
mov dword [ebx + 0x20], edi
test edi, edi
jne 0x40197e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [ebx + 0x14], 1
lea eax, [esi - 2]
mov edx, dword [ebx]
je 0x401a1a
push eax
call fcn.00401390
add esp, 4
jmp 0x401a25
push 2
push eax
call fcn.00401450
add esp, 8
mov edx, dword [ebx]
mov dword [ebp - 0x10], eax
movzx ecx, byte [edx + esi - 2]
movzx eax, byte [edx + esi - 1]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp - 0x10]
cmp ecx, eax
je 0x401a60
push eax
push ecx
push str.bad_checksum__0x_04x__expected_0x_04x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0x10
jmp 0x40196a
cmp dword [ebx + 0x28], 1
jne 0x401a9a
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 1]
push ecx
movzx ecx, byte [edx]
shl ecx, 8
or ecx, eax
push ecx
push str.recv:_type__0x_02x__size___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret