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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
mov rax, qword [0x14017e7c0]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, qword [rcx + 0x10]
mov eax, r9d
xor r14d, r14d
mov dword [rsp + 0x34], r8d
cmp r8d, eax
mov dword [rsp + 0x30], eax
mov r13d, r8d
mov dword [rsp + 0x54], r14d
lea r9, [rsp + 0x54]
mov r8d, 3
cmove r9, r14
mov rbp, rdx
mov rbx, rcx
call fcn.140057e60
mov rcx, rbp
mov r15d, eax
call fcn.140054ac0
movzx ecx, byte [rbx + 0x1f]
inc dword [rbx + 0x70]
mov byte [rsp + 0x50], al
test cl, cl
jne 0x140058c2f
mov r12d, dword [rbx + 0x54]
inc r12d
mov dword [rbx + 0x54], r12d
jmp 0x140058c3c
dec cl
movzx eax, cl
mov byte [rbx + 0x1f], al
mov r12d, dword [rbx + rax*4 + 0x24]
mov rdx, qword [rbp + 0x10]
mov r8d, r12d
mov rcx, rbx
call fcn.14005b2e0
cmp r15d, 5
jne 0x140058f35
mov rdx, qword [rbp + 0x10]
mov rcx, rbx
mov r15, qword [rbp + 0x20]
call fcn.140054850
mov rcx, rdi
mov qword [rsp + 0x48], rax
call fcn.14003fa60
mov ebp, r14d
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x30], r13d
je 0x140058cb3
movzx ecx, byte [rbx + 0x1f]
test cl, cl
jne 0x140058c90
inc dword [rbx + 0x54]
mov ebp, dword [rbx + 0x54]
jmp 0x140058c9c
dec cl
movzx eax, cl
mov byte [rbx + 0x1f], al
mov ebp, dword [rbx + rax*4 + 0x24]
mov r9d, r12d
mov dword [rsp + 0x20], ebp
mov r8d, r12d
mov edx, 0x55
mov rcx, rdi
call fcn.14003f920
mov r13d, r14d
cmp dword [r15], r14d
jle 0x140058e88
mov rax, r14
mov qword [rsp + 0x40], rax
nop word [rax + rax]
mov rdx, qword [r15 + 8]
lea r8, [rsp + 0x3c]
mov rcx, rbx
mov rdx, qword [rdx + rax]
call fcn.14005b150
mov esi, eax
test ebp, ebp
je 0x140058d87
mov rcx, qword [r15 + 8]
mov r8, qword [rsp + 0x40]
mov r8, qword [r8 + rcx]
nop dword [rax]
movzx edx, byte [r8]
lea ecx, [rdx + 0x63]
cmp cl, 1
ja 0x140058d12
mov r8, qword [r8 + 0x10]
jmp 0x140058d00
cmp dl, 0x9f
jne 0x140058d1c
movzx edx, byte [r8 + 0x36]
movzx ecx, dl
sub ecx, 0x61
je 0x140058d87
sub ecx, 0x23
je 0x140058d87
sub ecx, 1
je 0x140058d87
sub ecx, 1
je 0x140058d87
cmp ecx, 0x14
jne 0x140058d70
test dword [r8 + 4], 0x100000
jne 0x140058d67
movsx rax, word [r8 + 0x30]
test ax, ax
js 0x140058d62
lea rdx, [rax + rax*2]
mov rax, qword [r8 + 0x40]
add rdx, rdx
mov rcx, qword [rax + 8]
cmp byte [rcx + rdx*8 + 0x28], r14b
je 0x140058d67
mov eax, r14d
jmp 0x140058d6c
mov eax, 1
test eax, eax
je 0x140058d87
mov r9d, esi
mov dword [rsp + 0x20], ebp
mov r8d, ebp
mov edx, 0x55
mov rcx, rdi
call fcn.14003f920
mov eax, dword [r15]
dec eax
cmp r13d, eax
jl 0x140058de7
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x30], eax
jne 0x140058de7
mov r9d, eax
mov dword [rsp + 0x20], esi
mov r8d, r12d
mov edx, 0x4e
mov rcx, rdi
call fcn.14003f920
mov r8, qword [rsp + 0x48]
mov r9d, 0xfffffffc
mov edx, eax
mov rcx, rdi
call fcn.14003ff50
mov r8, qword [rdi + 8]
test r8, r8
je 0x140058e2f
movsxd rax, dword [rdi + 0x3c]
movzx edx, byte [rsp + 0x50]
or dl, 0x10
lea rcx, [rax + rax*2]
mov byte [r8 + rcx*8 - 0x15], dl
jmp 0x140058e2f
mov r9d, dword [rsp + 0x38]
mov r8d, r12d
mov edx, 0x4f
mov dword [rsp + 0x20], esi
mov rcx, rdi
call fcn.14003f920
mov r8, qword [rsp + 0x48]
mov r9d, 0xfffffffc
mov edx, eax
mov rcx, rdi
call fcn.14003ff50
mov rdx, qword [rdi + 8]
test rdx, rdx
je 0x140058e2f
movsxd rax, dword [rdi + 0x3c]
lea rcx, [rax + rax*2]
movzx eax, byte [rsp + 0x50]
mov byte [rdx + rcx*8 - 0x15], al
mov edx, dword [rsp + 0x3c]
test edx, edx
je 0x140058e6e
movzx r8d, byte [rbx + 0x1f]
cmp r8b, 8
jae 0x140058e6e
mov ecx, r14d
lea rax, [rbx + 0x88]
nop dword [rax]
cmp dword [rax + 0xc], edx
je 0x140058e6a
inc ecx
add rax, 0x14
cmp ecx, 0xa
jl 0x140058e50
mov dword [rbx + r8*4 + 0x24], edx
inc byte [rbx + 0x1f]
jmp 0x140058e6e
mov byte [rax + 6], 1
mov rax, qword [rsp + 0x40]
inc r13d
add rax, 0x28
mov qword [rsp + 0x40], rax
cmp r13d, dword [r15]
jl 0x140058cd0
test ebp, ebp
je 0x140058ec0
mov r9d, dword [rsp + 0x30]
mov r8d, ebp
mov edx, 0x4c
mov dword [rsp + 0x20], r14d
mov rcx, rdi
call fcn.14003f920
mov r9d, dword [rsp + 0x34]
xor r8d, r8d
mov edx, reloc.WS2_32.dll_recv
mov dword [rsp + 0x20], r14d
mov rcx, rdi
call fcn.14003f920
mov eax, dword [rsp + 0x38]
mov rdx, qword [rdi + 0x30]
not eax
test eax, eax
js 0x140058ee4
mov r8, qword [rdx + 0x80]
test r8, r8
je 0x140058ee4
movsxd rcx, eax
mov eax, dword [rdi + 0x3c]
mov dword [r8 + rcx*4], eax
mov eax, dword [rdi + 0x3c]
dec eax
mov dword [rdx + 0x64], eax
test ebp, ebp
je 0x14005915b
movzx edx, byte [rbx + 0x1f]
cmp dl, 8
jae 0x14005915b
mov ecx, r14d
lea rax, [rbx + 0x88]
nop dword [rax + rax]
cmp dword [rax + 0xc], ebp
je 0x140058f2c
inc ecx
add rax, 0x14
cmp ecx, 0xa
jl 0x140058f10
mov dword [rbx + rdx*4 + 0x24], ebp
inc byte [rbx + 0x1f]
jmp 0x14005915b
mov byte [rax + 6], 1
jmp 0x14005915b
mov rcx, qword [rbp + 0x10]
nop dword [rax]
movzx edx, byte [rcx]
lea eax, [rdx + 0x63]
cmp al, 1
ja 0x140058f50
mov rcx, qword [rcx + 0x10]
jmp 0x140058f40
cmp dl, 0x9f
jne 0x140058f59
movzx edx, byte [rcx + 0x36]
movzx r8d, dl
sub r8d, 0x61
je 0x14005904a
sub r8d, 0x23
je 0x14005904a
sub r8d, 1
je 0x14005904a
sub r8d, 1
je 0x14005904a
cmp r8d, 0x14
jne 0x140058fc6
test dword [rcx + 4], 0x100000
jne 0x140058fb9
movsx rax, word [rcx + 0x30]
test ax, ax
js 0x140058fb4
lea rdx, [rax + rax*2]
mov rax, qword [rcx + 0x40]
add rdx, rdx
mov rcx, qword [rax + 8]
cmp byte [rcx + rdx*8 + 0x28], r14b
je 0x140058fb9
mov eax, r14d
jmp 0x140058fbe
mov eax, 1
test eax, eax
je 0x14005904a
mov eax, dword [rsp + 0x30]
mov r8d, r12d
mov dword [rsp + 0x20], r14d
mov rcx, rdi
cmp eax, r13d
jne 0x140058fe9
mov r9d, eax
mov edx, 0x4c
call fcn.14003f920
jmp 0x14005904a
xor r9d, r9d
mov edx, 0x4d
call fcn.14003f920
mov r8d, dword [rbp + 0x2c]
mov r9d, r13d
mov edx, WSAGetLastError
mov esi, eax
mov rcx, rdi
mov dword [rsp + 0x20], r14d
call fcn.14003f920
mov r9d, dword [rsp + 0x30]
xor r8d, r8d
mov edx, reloc.WS2_32.dll_recv
mov dword [rsp + 0x20], r14d
mov rcx, rdi
call fcn.14003f920
mov edx, dword [rdi + 0x3c]
cmp edx, esi
jbe 0x14005903e
mov rax, qword [rdi + 8]
lea rcx, [rsi + rsi*2]
mov dword [rax + rcx*8 + 8], edx
mov ecx, dword [rdi + 0x3c]
mov rax, qword [rdi + 0x30]
dec ecx
mov dword [rax + 0x64], ecx
mov dword [rsp + 0x20], r14d
mov r8d, r12d
mov rcx, rdi
cmp r15d, 1
jne 0x140059086
mov r9d, r13d
mov edx, 0x26
call fcn.14003f920
mov r8d, dword [rbp + 0x2c]
mov r9d, r13d
mov edx, 0x46
mov dword [rsp + 0x20], r12d
mov rcx, rdi
call fcn.14003f920
jmp 0x14005915b
mov r9d, 1
mov edx, 0x30
call fcn.14003f920
mov r9d, 1
lea r8, [rsp + 0x50]
mov edx, eax
mov rcx, rdi
call fcn.14003ff50
mov rcx, rdi
mov r8d, dword [rbp + 0x2c]
mov dword [rsp + 0x20], r12d
cmp dword [rsp + 0x54], r14d
jne 0x1400590e3
mov r9d, r13d
mov edx, 0x44
call fcn.14003f920
mov r9d, 0xfffffff2
mov r8d, 1
mov edx, eax
mov rcx, rdi
call fcn.14003ff50
jmp 0x14005915b
xor r9d, r9d
mov edx, 0x45
call fcn.14003f920
mov r9d, 0xfffffff2
mov esi, eax
mov r8d, 1
mov edx, eax
mov rcx, rdi
call fcn.14003ff50
mov r9d, dword [rsp + 0x30]
mov edx, 0x4c
mov r8d, dword [rsp + 0x54]
mov rcx, rdi
mov dword [rsp + 0x20], r14d
call fcn.14003f920
mov r9d, r13d
mov dword [rsp + 0x20], r14d
xor r8d, r8d
mov edx, reloc.WS2_32.dll_recv
mov rcx, rdi
call fcn.14003f920
mov edx, dword [rdi + 0x3c]
cmp edx, esi
jbe 0x14005914f
mov rax, qword [rdi + 8]
lea rcx, [rsi + rsi*2]
mov dword [rax + rcx*8 + 8], edx
mov ecx, dword [rdi + 0x3c]
mov rax, qword [rdi + 0x30]
dec ecx
mov dword [rax + 0x64], ecx
test r12d, r12d
je 0x140059191
movzx ecx, byte [rbx + 0x1f]
cmp cl, 8
jae 0x140059191
lea rax, [rbx + 0x88]
cmp dword [rax + 0xc], r12d
je 0x14005918d
inc r14d
add rax, 0x14
cmp r14d, 0xa
jl 0x140059170
mov dword [rbx + rcx*4 + 0x24], r12d
inc byte [rbx + 0x1f]
jmp 0x140059191
mov byte [rax + 6], 1
mov rcx, rbx
call fcn.140059860
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1401386b0
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret