Function at 0x402157
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xe0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov eax, 0xc11c
mov dword [rbp - 0x54], eax
movabs rax, 0x10000
mov r11, rax
mov eax, 0x40
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov qword [rbp - 0x70], rax
mov rax, qword [rbp - 0x70]
cmp rax, 0
jne 0x4021b9
lea rax, str.Out_of_memory__1__n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_wprintf
mov eax, 0x80090304
jmp 0x402741
mov eax, 0
mov dword [rbp - 0x74], eax
mov eax, dword [rbp + 0x18]
mov dword [rbp - 0x78], eax
mov eax, 0x90312
mov dword [rbp - 0x64], eax
mov eax, dword [rbp - 0x64]
cmp eax, 0x90312
je 0x4021fc
mov eax, dword [rbp - 0x64]
cmp eax, 0x80090318
je 0x4021fc
mov eax, dword [rbp - 0x64]
cmp eax, 0x90320
jne 0x4026fc
mov eax, dword [rbp - 0x74]
cmp eax, 0
je 0x402217
mov eax, dword [rbp - 0x64]
cmp eax, 0x80090318
jne 0x4022e2
mov eax, dword [rbp - 0x78]
cmp eax, 0
je 0x4022da
mov rax, qword [rbp + 0x10]
add rax, 0x60
mov ecx, dword [rbp - 0x74]
mov rdx, qword [rbp - 0x70]
add rdx, rcx
mov ecx, 0x10000
mov qword [rbp - 0x80], rax
mov eax, dword [rbp - 0x74]
sub ecx, eax
mov eax, 0
mov r9, rax
mov r8, rcx
mov r11, rdx
mov rax, qword [rbp - 0x80]
mov rax, qword [rax]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.ws2_32.dll_recv
mov dword [rbp - 0x68], eax
mov eax, dword [rbp - 0x68]
cmp eax, 0xffffffff
jne 0x40229f
call sub.ws2_32.dll_WSAGetLastError
mov r11, rax
lea rax, [0x00509664]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_wprintf
mov eax, 0x80090304
mov dword [rbp - 0x64], eax
jmp 0x4026fc
mov eax, dword [rbp - 0x68]
cmp eax, 0
jne 0x4022ca
lea rax, [0x005096aa]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_wprintf
mov eax, 0x80090304
mov dword [rbp - 0x64], eax
jmp 0x4026fc
mov eax, dword [rbp - 0x74]
mov ecx, dword [rbp - 0x68]
add eax, ecx
mov dword [rbp - 0x74], eax
jmp 0x4022e2
mov eax, 1
mov dword [rbp - 0x78], eax
mov rax, qword [rbp - 0x70]
mov qword [rbp - 0x28], rax
mov eax, dword [rbp - 0x74]
mov dword [rbp - 0x30], eax
mov eax, 2
mov dword [rbp - 0x2c], eax
movabs rax, 0
mov qword [rbp - 0x18], rax
mov eax, 0
mov dword [rbp - 0x20], eax
mov eax, 0
mov dword [rbp - 0x1c], eax
mov eax, 2
mov dword [rbp - 0xc], eax
lea rax, [rbp - 0x30]
mov qword [rbp - 8], rax
mov eax, 0
mov dword [rbp - 0x10], eax
movabs rax, 0
mov qword [rbp - 0x48], rax
mov eax, 2
mov dword [rbp - 0x4c], eax
mov eax, 0
mov dword [rbp - 0x50], eax
mov eax, 1
mov dword [rbp - 0x3c], eax
lea rax, [rbp - 0x50]
mov qword [rbp - 0x38], rax
mov eax, 0
mov dword [rbp - 0x40], eax
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax]
add rcx, 0x30
mov rax, qword [rbp + 0x10]
add rax, 0x68
mov rdx, qword [rbp + 0x10]
add rdx, 0x78
mov qword [rbp - 0x80], rcx
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x58], rcx
lea rcx, [rbp - 0x58]
mov qword [rsp + 0x50], rcx
lea rcx, [rbp - 0x40]
mov qword [rsp + 0x48], rcx
movabs rcx, 0
mov qword [rsp + 0x40], rcx
mov ecx, 0
mov qword [rsp + 0x38], rcx
lea rcx, [rbp - 0x10]
mov qword [rsp + 0x30], rcx
mov ecx, 0x10
mov qword [rsp + 0x28], rcx
mov ecx, 0
mov qword [rsp + 0x20], rcx
mov ecx, dword [rbp - 0x54]
mov r9, rcx
movabs rcx, 0
mov r8, rcx
mov r11, rdx
mov r10, rax
mov rcx, r10
mov rdx, r11
mov r11, qword [rbp - 0x80]
mov r11, qword [r11]
call r11
mov dword [rbp - 0x64], eax
mov eax, dword [rbp - 0x64]
cmp eax, 0
je 0x402439
mov eax, dword [rbp - 0x64]
cmp eax, 0x90312
je 0x402439
mov eax, dword [rbp - 0x64]
cmp eax, 0
jge 0x402544
mov eax, dword [rbp - 0x58]
and eax, 0x4000
cmp eax, 0
je 0x402544
mov eax, dword [rbp - 0x50]
cmp eax, 0
je 0x402544
mov rax, qword [rbp - 0x48]
cmp rax, 0
je 0x402544
mov rax, qword [rbp + 0x10]
add rax, 0x60
mov ecx, 0
mov r9, rcx
mov ecx, dword [rbp - 0x50]
mov r8, rcx
mov rcx, qword [rbp - 0x48]
mov r11, rcx
mov rcx, qword [rax]
mov r10, rcx
mov rcx, r10
mov rdx, r11
call sub.ws2_32.dll_send
mov dword [rbp - 0x68], eax
mov eax, dword [rbp - 0x68]
cmp eax, 0xffffffff
je 0x40249c
mov eax, dword [rbp - 0x68]
cmp eax, 0
jne 0x402510
call sub.ws2_32.dll_WSAGetLastError
mov r11, rax
lea rax, str.Error__d_sending_data_to_server__2__n
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_wprintf
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax]
add rcx, 0x80
mov rax, qword [rbp - 0x48]
mov r10, rax
mov qword [rbp - 0x80], rcx
mov rcx, r10
mov r11, qword [rbp - 0x80]
mov r11, qword [r11]
call r11
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax]
add rcx, 0x48
mov rax, qword [rbp + 0x10]
add rax, 0x78
mov r10, rax
mov qword [rbp - 0x80], rcx
mov rcx, r10
mov r11, qword [rbp - 0x80]
mov r11, qword [r11]
call r11
mov eax, 0x80090304
jmp 0x402741
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax]
add rcx, 0x80
mov rax, qword [rbp - 0x48]
mov r10, rax
mov qword [rbp - 0x80], rcx
mov rcx, r10
mov r11, qword [rbp - 0x80]
mov r11, qword [r11]
call r11
movabs rax, 0
mov qword [rbp - 0x48], rax
mov eax, dword [rbp - 0x64]
cmp eax, 0x80090318
jne 0x402558
jmp 0x4021cf
mov eax, dword [rbp - 0x64]
cmp eax, 0
jne 0x40264f
mov eax, dword [rbp - 0x1c]
cmp eax, 5
jne 0x40261b
mov rax, qword [rbp + 0x20]
add rax, 8
mov ecx, dword [rbp - 0x20]
mov r11, rcx
mov ecx, 0x40
mov r10, rcx
mov qword [rbp - 0x80], rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LocalAlloc
mov rcx, qword [rbp - 0x80]
mov qword [rcx], rax
mov rax, qword [rbp + 0x20]
add rax, 8
mov rcx, qword [rax]
cmp rcx, 0
jne 0x4025cd
lea rax, [0x00509738]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_wprintf
mov eax, 0x80090304
jmp 0x402741
mov rax, qword [rbp + 0x20]
add rax, 8
mov ecx, dword [rbp - 0x74]
mov edx, dword [rbp - 0x20]
sub ecx, edx
mov rdx, qword [rbp - 0x70]
add rdx, rcx
mov ecx, dword [rbp - 0x20]
mov r8, rcx
mov r11, rdx
mov rcx, qword [rax]
mov r10, rcx
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
mov rax, qword [rbp + 0x20]
mov ecx, dword [rbp - 0x20]
mov dword [rax], ecx
mov rax, qword [rbp + 0x20]
add rax, 4
mov ecx, 2
mov dword [rax], ecx
jmp 0x40264a
mov rax, qword [rbp + 0x20]
add rax, 8
movabs rcx, 0
mov qword [rax], rcx
mov rax, qword [rbp + 0x20]
mov ecx, 0
mov dword [rax], ecx
mov rax, qword [rbp + 0x20]
add rax, 4
mov ecx, 0
mov dword [rax], ecx
jmp 0x4026fc
mov eax, dword [rbp - 0x64]
cmp eax, 0
jge 0x40267b
mov eax, dword [rbp - 0x64]
mov r11, rax
lea rax, str.Error_0x_x_returned_by_InitializeSecurityContext__2__n
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_wprintf
jmp 0x4026fc
mov eax, dword [rbp - 0x64]
cmp eax, 0x90320
jne 0x4026ae
mov rax, qword [rbp + 0x10]
mov r10, rax
mov rcx, r10
call fcn.0040323d
mov eax, 0
mov dword [rbp - 0x78], eax
mov eax, 0x90312
mov dword [rbp - 0x64], eax
jmp 0x4021cf
mov eax, dword [rbp - 0x1c]
cmp eax, 5
jne 0x4026ef
mov eax, dword [rbp - 0x74]
mov ecx, dword [rbp - 0x20]
sub eax, ecx
mov rcx, qword [rbp - 0x70]
add rcx, rax
mov eax, dword [rbp - 0x20]
mov r8, rax
mov r11, rcx
mov rax, qword [rbp - 0x70]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
mov eax, dword [rbp - 0x20]
mov dword [rbp - 0x74], eax
jmp 0x4026f7
mov eax, 0
mov dword [rbp - 0x74], eax
jmp 0x4021cf
mov eax, dword [rbp - 0x64]
cmp eax, 0
jge 0x40272f
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax]
add rcx, 0x48
mov rax, qword [rbp + 0x10]
add rax, 0x78
mov r10, rax
mov qword [rbp - 0x80], rcx
mov rcx, r10
mov r11, qword [rbp - 0x80]
mov r11, qword [r11]
call r11
mov rax, qword [rbp - 0x70]
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_LocalFree
mov eax, dword [rbp - 0x64]
leave
ret