Function at 0x404237
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket

Disassembly:
push rbp
push rdi
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x68
mov qword [rbp + 0x28], rcx
mov eax, edx
mov qword [rbp + 0x38], r8
mov edx, r9d
mov word [rbp + 0x30], ax
mov eax, edx
mov word [rbp + 0x40], ax
mov qword [rbp - 0x10], 0
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx edx, word [rbp + 0x40]
movzx eax, word [rbp + 0x30]
mov rcx, qword [rbp + 0x38]
mov r9d, edx
mov r8, rcx
mov edx, eax
mov rcx, qword [rbp + 0x28]
call fcn.00403e86
mov dword [rbp - 0x2c], eax
test eax, eax
jg 0x40429e
mov eax, 0xffffffff
jmp 0x404774
movzx eax, word [0x0040d0c8]
test ax, ax
je 0x4042bf
cmp word [rbp + 0x40], 0
jne 0x4042e6
lea rcx, str.UDP_listen_needs__p_arg
call fcn.0040359c
jmp 0x4042e6
movsxd rax, dword [rbp - 0x2c]
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_listen]
call rax
mov ebx, eax
test ebx, ebx
jns 0x4042e6
lea rcx, str.local_listen_fuxored
call fcn.0040359c
movzx eax, word [0x0040d0ca]
test ax, ax
je 0x404434
mov dword [rbp - 0x24], 0x10
mov rdx, qword [0x0040d088]
movsxd rax, dword [rbp - 0x2c]
lea rcx, [rbp - 0x24]
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_getsockname]
call rax
mov ebx, eax
test ebx, ebx
jns 0x40432d
lea rcx, str.local_getsockname_failed
call fcn.004034a4
lea rax, [0x0040da70]
mov rax, qword [rax]
movabs rdi, 0x6e696e657473696c
mov qword [rax], rdi
mov dword [rax + 8], 0x6e6f2067
mov word [rax + 0xc], 0x5b20
mov byte [rax + 0xe], 0
mov rax, qword [0x0040d088]
mov eax, dword [rax + 4]
test eax, eax
je 0x40438f
mov rax, qword [0x0040d088]
mov eax, dword [rax + 4]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rdx, rax
lea rax, [0x0040da70]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcat
jmp 0x4043c3
lea rax, [0x0040da70]
mov rdx, qword [rax]
mov rax, rdx
mov rcx, 0xffffffffffffffff
mov r8, rax
mov eax, 0
mov rdi, r8
repne scasb al, byte [rdi]
mov rax, rcx
not rax
sub rax, 1
add rax, rdx
mov dword [rax], 0x796e61
lea rax, [0x0040da70]
mov rdx, qword [rax]
mov rax, rdx
mov rcx, 0xffffffffffffffff
mov r8, rax
mov eax, 0
mov rdi, r8
repne scasb al, byte [rdi]
mov rax, rcx
not rax
sub rax, 1
add rax, rdx
movabs rdi, 0x2e2e2e206425205d
mov qword [rax], rdi
mov byte [rax + 8], 0
mov rax, qword [0x0040d088]
movzx eax, word [rax + 2]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_ntohs]
call rax
mov word [rbp - 0x12], ax
movzx eax, word [rbp - 0x12]
lea rdx, [0x0040da70]
mov rcx, qword [rdx]
mov edx, eax
call fcn.004034a4
movzx eax, word [0x0040d0c8]
test ax, ax
je 0x4044ec
mov dword [rbp - 0x24], 0x10
mov eax, dword [0x0040d0cc]
mov edx, eax
mov ecx, 2
call fcn.004036c6
mov rax, rbp
mov rdx, rax
lea rax, [0x0040da80]
mov rcx, rax
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x404733
mov r8, qword [0x0040d090]
lea rax, [0x0040da70]
mov rcx, qword [rax]
mov edi, dword [rbp - 0x2c]
movsxd rax, edi
lea rdx, [rbp - 0x24]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], r8
mov r9d, 2
mov r8d, 0x2000
mov rdx, rcx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_recvfrom]
call rax
mov edx, 0
mov ecx, 0
call fcn.004036c6
mov rdx, qword [0x0040d090]
movsxd rax, edi
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_connect]
call rax
mov ebx, eax
jmp 0x404579
mov dword [rbp - 0x24], 0x10
mov eax, dword [0x0040d0cc]
mov edx, eax
mov ecx, 2
call fcn.004036c6
mov rax, rbp
mov rdx, rax
lea rax, [0x0040da80]
mov rcx, rax
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x404736
mov rdx, qword [0x0040d090]
mov esi, dword [rbp - 0x2c]
movsxd rax, esi
lea rcx, [rbp - 0x24]
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_accept]
call rax
mov ebx, eax
mov edx, 0
mov ecx, 0
call fcn.004036c6
movsxd rax, esi
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
movsxd rax, esi
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov dword [rbp - 0x2c], ebx
test ebx, ebx
js 0x404748
lea rax, [0x0040da70]
mov rax, qword [rax]
mov r8d, 0x40
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
lea rax, [0x0040da70]
mov rax, qword [rax]
add rax, 0x20
mov qword [rbp - 0x20], rax
mov dword [rbp - 0x24], 0x10
mov rdx, qword [0x0040d088]
movsxd rax, dword [rbp - 0x2c]
lea rcx, [rbp - 0x24]
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_getsockname]
call rax
mov ebx, eax
test ebx, ebx
jns 0x4045e7
lea rcx, str.post_rcv_getsockname_failed
call fcn.004034a4
mov rax, qword [0x0040d088]
mov eax, dword [rax + 4]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rdx, rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sub.msvcrt.dll_strcpy
mov rax, qword [0x0040d090]
movzx eax, word [rax + 2]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_ntohs]
call rax
mov word [rbp - 0x12], ax
mov rax, qword [0x0040d090]
mov eax, dword [rax + 4]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rdx, rax
lea rax, [0x0040da70]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcpy
movzx eax, word [0x0040d0c2]
movzx eax, ax
lea rdx, [0x0040da70]
mov rcx, qword [rdx]
mov edx, eax
call fcn.00403810
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov dword [rbp - 0x24], 0
cmp qword [rbp + 0x28], 0
je 0x4046b5
mov rax, qword [rbp - 0x10]
add rax, 0x1c0
mov r8d, 0x10
mov rdx, rax
mov rcx, qword [rbp + 0x28]
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x4046b5
mov dword [rbp - 0x24], 1
cmp word [rbp + 0x30], 0
je 0x4046cd
movzx eax, word [rbp - 0x12]
cmp ax, word [rbp + 0x30]
je 0x4046cd
mov dword [rbp - 0x24], 1
mov eax, dword [rbp - 0x24]
test eax, eax
je 0x404701
movzx eax, word [rbp - 0x12]
mov rdx, qword [rbp - 0x10]
lea r8, [rdx + 0x100]
mov rcx, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x20]
mov dword [rsp + 0x20], eax
mov r9, r8
mov r8, rcx
lea rcx, str.invalid_connection_to___s__from__s___s___d
call fcn.0040359c
movzx eax, word [rbp - 0x12]
mov rdx, qword [rbp - 0x10]
lea r8, [rdx + 0x100]
mov rcx, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x20]
mov dword [rsp + 0x20], eax
mov r9, r8
mov r8, rcx
lea rcx, str.connect_to___s__from__s___s___d
call fcn.004034a4
mov eax, dword [rbp - 0x2c]
jmp 0x404774
nop
jmp 0x404737
nop
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0x274c
jmp 0x404749
nop
mov ebx, dword [rbp - 0x2c]
movsxd rax, ebx
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
movsxd rax, ebx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, 0xffffffff
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
ret