Function at 0x402301
Capabilities:
Initialize winsock library

Disassembly:
push rbp
mov eax, 0x1250
call fcn.00403800
sub rsp, rax
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x11e0], ecx
mov qword [rbp + 0x11e8], rdx
call sym.__main
lea rax, [rbp + 0xff0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x11a0], eax
cmp dword [rbp + 0x11a0], 0
je 0x402371
mov eax, dword [rbp + 0x11a0]
mov edx, eax
lea rax, str.WSAStartup_failed:__d_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x4026fa
lea rax, [0x0040b058]
mov rcx, rax
call sym.chdir
call sym.initConnection
test eax, eax
jne 0x4026f4
mov dword [rbp + 0x119c], 0
mov dword [rbp + 0x1198], 0
jmp 0x4026c5
mov eax, dword [rbp + 0x119c]
cdqe
mov byte [rbp + rax - 0x10], 0
lea rax, [rbp - 0x10]
mov rcx, rax
call sym.trim
lea rax, [rbp - 0x10]
mov qword [rbp + 0x11c8], rax
lea rax, [rbp - 0x10]
lea rdx, [0x0040bbe3]
mov rcx, rax
call sym.strstr
mov rdx, rax
lea rax, [rbp - 0x10]
cmp rdx, rax
jne 0x4023f3
mov ecx, 0
call sym.exit
mov rax, qword [rbp + 0x11c8]
movzx eax, byte [rax]
cmp al, 0x21
jne 0x4026c5
mov rax, qword [rbp + 0x11c8]
add rax, 1
mov qword [rbp + 0x11c0], rax
jmp 0x402421
add qword [rbp + 0x11c0], 1
mov rax, qword [rbp + 0x11c0]
movzx eax, byte [rax]
cmp al, 0x20
je 0x40243d
mov rax, qword [rbp + 0x11c0]
movzx eax, byte [rax]
test al, al
jne 0x402419
mov rax, qword [rbp + 0x11c0]
movzx eax, byte [rax]
test al, al
jne 0x402450
jmp 0x4026c5
mov rax, qword [rbp + 0x11c0]
mov byte [rax], 0
mov rax, qword [rbp + 0x11c8]
add rax, 1
mov qword [rbp + 0x11c0], rax
mov rax, qword [rbp + 0x11c0]
mov rcx, rax
call sym.strlen
add rax, 2
add qword [rbp + 0x11c8], rax
jmp 0x4024a8
mov rax, qword [rbp + 0x11c8]
mov rcx, rax
call sym.strlen
lea rdx, [rax - 1]
mov rax, qword [rbp + 0x11c8]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp + 0x11c8]
mov rcx, rax
call sym.strlen
lea rdx, [rax - 1]
mov rax, qword [rbp + 0x11c8]
add rax, rdx
movzx eax, byte [rax]
cmp al, 0xa
je 0x402488
mov rax, qword [rbp + 0x11c8]
mov rcx, rax
call sym.strlen
lea rdx, [rax - 1]
mov rax, qword [rbp + 0x11c8]
add rax, rdx
movzx eax, byte [rax]
cmp al, 0xd
je 0x402488
mov rax, qword [rbp + 0x11c8]
mov qword [rbp + 0x1190], rax
jmp 0x402508
add qword [rbp + 0x11c8], 1
mov rax, qword [rbp + 0x11c8]
movzx eax, byte [rax]
cmp al, 0x20
je 0x402524
mov rax, qword [rbp + 0x11c8]
movzx eax, byte [rax]
test al, al
jne 0x402500
mov rax, qword [rbp + 0x11c8]
mov byte [rax], 0
add qword [rbp + 0x11c8], 1
mov rax, qword [rbp + 0x1190]
mov qword [rbp + 0x11b8], rax
jmp 0x402571
mov rax, qword [rbp + 0x11b8]
movzx eax, byte [rax]
movzx eax, al
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll_toupper]
call rax
mov edx, eax
mov rax, qword [rbp + 0x11b8]
mov byte [rax], dl
add qword [rbp + 0x11b8], 1
mov rax, qword [rbp + 0x11b8]
movzx eax, byte [rax]
test al, al
jne 0x402546
mov dword [rbp + 0x11b4], 1
mov rax, qword [rbp + 0x11c8]
lea rdx, str._________._0123456789:_____ABCDEFGHIJKLMNOPQRSTUVWXYZ____abcdefghijklmnopqrstuvwxyz
mov rcx, rax
call sym.strtok
mov qword [rbp + 0x11a8], rax
mov rax, qword [rbp + 0x1190]
mov qword [rbp - 0x60], rax
jmp 0x40265d
mov rax, qword [rbp + 0x11a8]
movzx eax, byte [rax]
cmp al, 0xa
je 0x402642
mov rax, qword [rbp + 0x11a8]
mov rcx, rax
call sym.strlen
add rax, 1
mov rcx, rax
call sym.malloc
mov rdx, rax
mov eax, dword [rbp + 0x11b4]
cdqe
mov qword [rbp + rax*8 - 0x60], rdx
mov rax, qword [rbp + 0x11a8]
mov rcx, rax
call sym.strlen
lea rdx, [rax + 1]
mov eax, dword [rbp + 0x11b4]
cdqe
mov rax, qword [rbp + rax*8 - 0x60]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp + 0x11b4]
cdqe
mov rax, qword [rbp + rax*8 - 0x60]
mov rdx, qword [rbp + 0x11a8]
mov rcx, rax
call sym.strcpy
add dword [rbp + 0x11b4], 1
lea rax, str._________._0123456789:_____ABCDEFGHIJKLMNOPQRSTUVWXYZ____abcdefghijklmnopqrstuvwxyz
mov rdx, rax
mov ecx, 0
call sym.strtok
mov qword [rbp + 0x11a8], rax
cmp qword [rbp + 0x11a8], 0
jne 0x4025b6
lea rdx, [rbp - 0x60]
mov eax, dword [rbp + 0x11b4]
mov ecx, eax
call sym.processCmd
cmp dword [rbp + 0x11b4], 1
jle 0x4026c5
mov dword [rbp + 0x11a4], 1
mov dword [rbp + 0x11a4], 1
jmp 0x4026b7
mov eax, dword [rbp + 0x11a4]
cdqe
mov rax, qword [rbp + rax*8 - 0x60]
mov rcx, rax
call sym.free
add dword [rbp + 0x11a4], 1
mov eax, dword [rbp + 0x11a4]
cmp eax, dword [rbp + 0x11b4]
jl 0x40269b
mov eax, dword [0x0040f040]
lea rdx, [rbp - 0x10]
mov r8d, 0x1000
mov ecx, eax
call sym.recvLine
mov dword [rbp + 0x119c], eax
cmp dword [rbp + 0x119c], 0xffffffff
jne 0x4023a6
jmp 0x402380
nop
jmp 0x402380
add rsp, 0x1250
pop rbp
ret