Function at 0x180083660
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rbx, qword [rcx + 0x10]
mov r14, r9
mov r12, r8
mov eax, dword [rbx + 0x3c]
mov rbp, qword [rbx + 0x30]
mov rdi, rcx
movsxd rsi, dword [rbp + 0x80]
mov dword [rsp + 0x30], eax
lea eax, [rsi + 1]
mov dword [rbp + 0x80], eax
lea eax, [rsi - 1]
test esi, eax
jne 0x1800836ca
mov rdx, qword [rbp + 0x88]
mov rcx, qword [rbp]
lea eax, [rsi + rsi + 1]
movsxd r8, eax
shl r8, 2
call fcn.180017710
mov qword [rbp + 0x88], rax
mov rcx, qword [rbp + 0x88]
or r15d, 0xffffffff
test rcx, rcx
je 0x1800836de
mov dword [rcx + rsi*4], r15d
mov r13d, dword [rsp + 0xa8]
sub r15d, esi
xor esi, esi
mov dword [rsp + 0x80], r15d
test r13d, r13d
je 0x1800838ac
mov rax, qword [rbx + 0x30]
movsxd rbp, dword [rbx + 0x3c]
cmp dword [rax + 0x64], ebp
jg 0x180083722
lea edx, [rsi + 0x2e]
xor r9d, r9d
mov r8d, r13d
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.18003a660
mov ebp, eax
jmp 0x18008374b
lea rcx, [rbp + rbp*2]
lea eax, [rbp + 1]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov byte [rax + rcx*8 + 3], sil
mov dword [rax + rcx*8 + 4], r13d
mov qword [rax + rcx*8 + 8], rsi
mov qword [rax + rcx*8 + 0x10], rsi
mov word [rax + rcx*8], gethostbyaddr
mov rsi, qword [rsp + 0xb0]
test rsi, rsi
je 0x18008375a
inc dword [rsi]
mov eax, dword [r12 + 0xc]
mov r8d, dword [r12 + 8]
lea r9d, [r13 + 1]
mov edx, 0x2a
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.18003a6c0
mov rcx, qword [rbx]
cmp byte [rcx + 0x55], 0
mov r15d, eax
mov edx, eax
je 0x180083796
mov r8, rsi
mov edx, 0xfffffffa
call fcn.18003b100
jmp 0x1800837d5
test eax, eax
jns 0x18008379f
mov edx, dword [rbx + 0x3c]
dec edx
movsxd rax, edx
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
cmp byte [rax + rcx*8 + 1], 0
lea rdx, [rax + rcx*8]
je 0x1800837c8
mov r9d, 0xfffffffa
mov r8, rsi
mov rcx, rbx
call fcn.18003b3c0
jmp 0x1800837d5
test rsi, rsi
je 0x1800837d5
mov qword [rdx + 0x10], rsi
mov byte [rdx + 1], 0xfa
lea r8d, [r15 + 2]
mov r15d, dword [rsp + 0x80]
mov edx, 0x2b
mov r9d, r15d
mov rcx, rbx
mov dword [rsp + 0x20], r8d
call fcn.18003a6c0
mov r11d, dword [rbx + 0x3c]
mov rax, qword [rbx + 0x30]
dec r11d
mov dword [rax + 0x6c], r11d
mov edx, dword [rbx + 0x3c]
test ebp, ebp
jns 0x18008380f
lea ebp, [rdx - 1]
mov rax, qword [rbx]
cmp byte [rax + 0x55], 0
je 0x180083821
lea rax, [0x1802f0540]
jmp 0x180083830
movsxd rax, ebp
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
lea rax, [rax + rcx*8]
mov dword [rax + 8], edx
mov eax, dword [r12 + 0xc]
mov r8d, dword [r12 + 8]
dec eax
lea r9d, [r13 + 1]
mov edx, 0x1e
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.18003a6c0
mov rax, qword [rbx + 0x30]
movsxd r11, dword [rbx + 0x3c]
xor esi, esi
cmp dword [rax + 0x64], r11d
jg 0x18008387c
lea edx, [rsi + 0x16]
lea r8d, [rsi + 1]
mov r9d, r13d
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.18003a660
jmp 0x1800838ac
lea rcx, [r11 + r11*2]
lea eax, [r11 + 1]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], 1
mov dword [rax + rcx*8 + 8], r13d
mov dword [rax + rcx*8 + 0xc], esi
mov qword [rax + rcx*8 + 0x10], rsi
mov word [rax + rcx*8], reloc.WS2_32.dll_shutdown
mov rax, qword [rdi]
cmp byte [rax + 0x55], 0
je 0x1800838bc
xor eax, eax
jmp 0x180083d45
mov r13, qword [rsp + 0x88]
mov r8d, dword [r13 + 0x14]
test r8d, r8d
jle 0x1800838e5
mov r9d, r15d
mov edx, 0x8a
mov rcx, rbx
mov dword [rsp + 0x20], 1
call fcn.18003a6c0
movzx ecx, byte [r14]
sub ecx, 0xa
je 0x180083c2e
dec ecx
je 0x180083ad5
dec ecx
je 0x1800839df
dec ecx
je 0x180083975
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
mov edx, dword [r12 + 0xc]
mov r8d, dword [r12 + 8]
cmp dword [rax + 0x64], ecx
jg 0x180083933
mov r9d, edx
mov rcx, rbx
mov edx, 0x21
mov dword [rsp + 0x20], esi
call fcn.18003a660
jmp 0x18008395e
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], r8d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], esi
mov qword [rax + rcx*8 + 0x10], rsi
mov word [rax + rcx*8], 0x21
mov r8d, dword [r12 + 0xc]
mov edx, dword [r12 + 8]
mov rcx, rdi
call fcn.1800552b0
jmp 0x180083c45
cmp dword [r14 + 8], 0
jne 0x1800839b3
mov ecx, dword [r12 + 0xc]
mov edx, dword [rdi + 0x48]
mov r8d, dword [rdi + 0x4c]
cmp ecx, edx
jg 0x18008399a
lea eax, [r8 + rcx]
sub edx, ecx
mov dword [rdi + 0x4c], eax
mov dword [rdi + 0x48], edx
jmp 0x1800839a6
mov eax, dword [rdi + 0x58]
lea r8d, [rax + 1]
add eax, ecx
mov dword [rdi + 0x58], eax
mov dword [r14 + 8], r8d
mov eax, dword [r12 + 0xc]
mov dword [r14 + 0xc], eax
mov r9d, dword [r12 + 0xc]
mov r8d, dword [r14 + 8]
mov edx, dword [r12 + 8]
mov rcx, rdi
call fcn.180055670
mov r8d, dword [r14 + 4]
mov edx, reloc.WS2_32.dll_select
mov rcx, rbx
call fcn.18003a7c0
jmp 0x180083c45
movzx eax, byte [rdi + 0x1f]
test al, al
jne 0x1800839ef
inc dword [rdi + 0x58]
mov ebp, dword [rdi + 0x58]
jmp 0x1800839fb
dec al
movzx eax, al
mov byte [rdi + 0x1f], al
mov ebp, dword [rdi + rax*4 + 0x28]
movzx eax, byte [rdi + 0x1f]
test al, al
jne 0x180083a0b
inc dword [rdi + 0x58]
mov esi, dword [rdi + 0x58]
jmp 0x180083a17
dec al
movzx eax, al
mov byte [rdi + 0x1f], al
mov esi, dword [rdi + rax*4 + 0x28]
mov r9d, dword [r12 + 0xc]
mov r8d, dword [r12 + 8]
mov edx, gethostbyaddr
mov rcx, rbx
mov dword [rsp + 0x20], ebp
call fcn.18003a6c0
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
mov edx, dword [r14 + 4]
cmp dword [rax + 0x64], ecx
jg 0x180083a60
mov r8d, edx
mov r9d, esi
mov rcx, rbx
mov edx, 0x4a
mov dword [rsp + 0x20], 0
call fcn.18003a660
jmp 0x180083a8c
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov dword [rax + rcx*8 + 4], edx
xor edx, edx
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 8], esi
mov word [rax + rcx*8], 0x4a
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], rdx
mov r8d, dword [r14 + 4]
mov r9d, ebp
mov edx, 0x4b
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.18003a6c0
mov r11, qword [rbx]
cmp byte [r11 + 0x55], 0
jne 0x180083abf
movsxd rax, dword [rbx + 0x3c]
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
mov byte [rax + rcx*8 - 0x15], 8
mov edx, esi
mov rcx, rdi
call fcn.1800584c0
mov edx, ebp
call fcn.1800584c0
jmp 0x180083c45
mov rax, qword [r13]
movzx edx, byte [r14 + 1]
mov rcx, qword [rax + 8]
mov rcx, qword [rcx]
call fcn.180050f60
mov byte [r14 + 1], al
movzx eax, byte [rdi + 0x1f]
test al, al
jne 0x180083afe
inc dword [rdi + 0x58]
mov esi, dword [rdi + 0x58]
jmp 0x180083b0a
dec al
movzx eax, al
mov byte [rdi + 0x1f], al
mov esi, dword [rdi + rax*4 + 0x28]
mov rax, qword [rbx + 0x30]
movsxd rdx, dword [rbx + 0x3c]
mov r8d, dword [r12 + 8]
cmp dword [rax + 0x64], edx
jg 0x180083b35
mov edx, gethostbyaddr
mov rcx, rbx
mov dword [rsp + 0x20], esi
lea r9d, [rdx - 0x30]
call fcn.18003a660
mov edx, eax
jmp 0x180083b68
lea rcx, [rdx + rdx*2]
lea eax, [rdx + 1]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], r8d
mov dword [rax + rcx*8 + 8], 1
mov dword [rax + rcx*8 + 0xc], esi
mov qword [rax + rcx*8 + 0x10], 0
mov word [rax + rcx*8], gethostbyaddr
mov rcx, qword [rbx]
cmp byte [rcx + 0x55], 0
je 0x180083b81
lea r8, [r14 + 1]
mov edx, 1
call fcn.18003b100
jmp 0x180083bab
test edx, edx
jns 0x180083b8a
mov edx, dword [rbx + 0x3c]
dec edx
movsxd rax, edx
lea r8, [r14 + 1]
mov r9d, 1
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
lea rdx, [rax + rcx*8]
mov rcx, rbx
call fcn.18003b3c0
mov edx, dword [r12 + 8]
mov r8d, 1
mov rcx, rdi
call fcn.1800552b0
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
mov edx, dword [r14 + 4]
cmp dword [rax + 0x64], ecx
jg 0x180083bf6
mov r8d, edx
mov r9d, esi
mov rcx, rbx
mov edx, WSASetLastError
mov dword [rsp + 0x20], 0
call fcn.18003a660
mov edx, esi
mov rcx, rdi
call fcn.1800584c0
jmp 0x180083c45
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov dword [rax + rcx*8 + 4], edx
xor edx, edx
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], rdx
mov dword [rax + rcx*8 + 8], esi
mov word [rax + rcx*8], WSASetLastError
mov edx, esi
mov rcx, rdi
call fcn.1800584c0
jmp 0x180083c45
mov r8d, dword [r14 + 4]
mov edx, dword [r12 + 8]
mov r9d, 1
mov rcx, rdi
call fcn.180055670
mov r8d, dword [r13 + 0x10]
test r8d, r8d
je 0x180083c78
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
cmp dword [rax + 0x64], ecx
jg 0x180083cd1
mov r9d, dword [rsp + 0xb8]
mov edx, 0x8d
mov rcx, rbx
mov dword [rsp + 0x20], 0
call fcn.18003a660
xor r9d, r9d
mov rdx, qword [rbx + 0x30]
mov rcx, qword [rdx + 0x88]
test rcx, rcx
je 0x180083c9e
movsxd rax, r15d
lea rax, [rax*4 + 4]
sub rcx, rax
mov eax, dword [rbx + 0x3c]
mov dword [rcx], eax
mov eax, dword [rbx + 0x3c]
dec eax
mov dword [rdx + 0x6c], eax
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
cmp dword [rax + 0x64], ecx
jg 0x180083d0c
mov r8d, dword [rsp + 0xa0]
mov dword [rsp + 0x20], r9d
xor r9d, r9d
lea edx, [r9 + 0xf]
mov rcx, rbx
call fcn.18003a660
jmp 0x180083d41
lea rdx, [rcx + rcx*2]
lea eax, [rcx + 1]
mov rcx, qword [rbx + 8]
mov dword [rbx + 0x3c], eax
mov eax, dword [rsp + 0xb8]
xor r9d, r9d
mov byte [rcx + rdx*8 + 3], 0
mov dword [rcx + rdx*8 + 4], r8d
mov dword [rcx + rdx*8 + 0xc], r9d
mov dword [rcx + rdx*8 + 8], eax
mov qword [rcx + rdx*8 + 0x10], r9
mov word [rcx + rdx*8], 0x8d
jmp 0x180083c7b
mov rdx, qword [rbx + 8]
lea r8, [rcx + rcx*2]
lea eax, [rcx + 1]
mov ecx, dword [rsp + 0xa0]
mov dword [rbx + 0x3c], eax
mov byte [rdx + r8*8 + 3], 0
mov qword [rdx + r8*8 + 8], 0
mov qword [rdx + r8*8 + 0x10], r9
mov word [rdx + r8*8], reloc.WS2_32.dll_ntohs
mov dword [rdx + r8*8 + 4], ecx
mov eax, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x90]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret