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

Disassembly:
mov r11, rsp
mov dword [r11 + 0x20], r9d
mov dword [r11 + 0x18], r8d
push rdi
push r13
sub rsp, 0x78
mov qword [r11 - 0x18], rbx
mov rbx, qword [rcx + 0x10]
mov qword [r11 - 0x20], rbp
xor eax, eax
mov qword [r11 - 0x28], rsi
mov ebp, r9d
cmp r8d, ebp
mov qword [r11 - 0x38], r14
lea r9, [r11 - 0x58]
mov qword [r11 - 0x40], r15
mov r15d, r8d
lea r8d, [rax + 3]
cmove r9, rax
mov rsi, rdx
mov rdi, rcx
mov dword [rsp + 0x30], eax
call fcn.18004e740
mov rcx, rsi
mov r13d, eax
call fcn.18004bff0
movzx ecx, byte [rdi + 0x1f]
inc dword [rdi + 0x78]
mov byte [rsp + 0x90], al
test cl, cl
jne 0x18004f586
inc dword [rdi + 0x58]
mov r14d, dword [rdi + 0x58]
jmp 0x18004f593
dec cl
movzx eax, cl
mov byte [rdi + 0x1f], al
mov r14d, dword [rdi + rax*4 + 0x28]
mov rdx, qword [rsi + 0x10]
mov r8d, r14d
mov rcx, rdi
mov qword [rsp + 0x58], r12
call fcn.180051f00
cmp r13d, 5
jne 0x18004fa1f
mov rdx, qword [rsi + 0x10]
mov r15, qword [rsi + 0x20]
mov rcx, rdi
call fcn.18004be20
mov rcx, rbx
mov rbp, rax
call fcn.180035d60
mov esi, dword [rsp + 0xa0]
xor r8d, r8d
mov dword [rsp + 0x98], eax
mov r12d, r8d
cmp dword [rsp + 0xa8], esi
je 0x18004f622
movzx ecx, byte [rdi + 0x1f]
test cl, cl
jne 0x18004f5fa
inc dword [rdi + 0x58]
mov r12d, dword [rdi + 0x58]
jmp 0x18004f607
dec cl
movzx eax, cl
mov byte [rdi + 0x1f], al
mov r12d, dword [rdi + rax*4 + 0x28]
mov r9d, r14d
mov r8d, r14d
mov edx, 0x55
mov rcx, rbx
mov dword [rsp + 0x20], r12d
call fcn.1800356f0
xor r8d, r8d
cmp dword [r15], 0
mov r13d, r8d
jle 0x18004f8e5
mov rax, r8
mov qword [rsp + 0x38], rax
nop word [rax + rax]
mov rdx, qword [r15 + 8]
lea r8, [rsp + 0x34]
mov rcx, rdi
mov rdx, qword [rax + rdx]
call fcn.180051da0
mov esi, eax
test r12d, r12d
je 0x18004f6e4
mov rcx, qword [r15 + 8]
mov rax, qword [rsp + 0x38]
mov rax, qword [rax + rcx]
nop dword [rax]
movzx ecx, byte [rax]
cmp cl, 0x9c
je 0x18004f67d
cmp cl, 0x9b
jne 0x18004f683
mov rax, qword [rax + 0x10]
jmp 0x18004f670
movzx ecx, byte [rax]
cmp cl, 0x9d
jne 0x18004f68f
movzx ecx, byte [rax + 0x36]
cmp cl, 0x61
je 0x18004f6e4
cmp cl, 0x83
jbe 0x18004f6cc
cmp cl, 0x86
jbe 0x18004f6e4
cmp cl, 0x98
jne 0x18004f6cc
test dword [rax + 4], 0x100000
jne 0x18004f6cc
movzx ecx, word [rax + 0x30]
test cx, cx
js 0x18004f6e4
mov rax, qword [rax + 0x40]
movsx rdx, cx
mov rcx, qword [rax + 8]
shl rdx, 5
cmp byte [rdx + rcx + 0x18], 0
jne 0x18004f6e4
mov r9d, esi
mov r8d, r12d
mov edx, 0x55
mov rcx, rbx
mov dword [rsp + 0x20], r12d
call fcn.1800356f0
mov eax, dword [r15]
dec eax
cmp r13d, eax
jl 0x18004f7a0
mov eax, dword [rsp + 0xa0]
cmp dword [rsp + 0xa8], eax
jne 0x18004f7a0
mov r9d, eax
mov r8d, r14d
mov edx, 0x4e
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.1800356f0
mov rcx, qword [rbx]
cmp byte [rcx + 0x55], 0
je 0x18004f735
mov r8, rbp
mov edx, 0xfffffffc
call fcn.180036130
jmp 0x18004f773
test eax, eax
jns 0x18004f73e
mov eax, dword [rbx + 0x3c]
dec eax
cdqe
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
cmp byte [rax + rcx*8 + 1], 0
lea rdx, [rax + rcx*8]
je 0x18004f766
mov r9d, 0xfffffffc
mov r8, rbp
mov rcx, rbx
call fcn.1800363f0
jmp 0x18004f773
test rbp, rbp
je 0x18004f773
mov qword [rdx + 0x10], rbp
mov byte [rdx + 1], 0xfc
mov rax, qword [rbx]
cmp byte [rax + 0x55], 0
jne 0x18004f87d
movsxd rax, dword [rbx + 0x3c]
movzx edx, byte [rsp + 0x90]
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
or dl, 0x10
mov byte [rax + rcx*8 - 0x15], dl
jmp 0x18004f87d
mov rax, qword [rbx + 0x30]
movsxd rdx, dword [rbx + 0x3c]
cmp dword [rax + 0x64], edx
jg 0x18004f7cd
mov r9d, dword [rsp + 0x98]
mov r8d, r14d
mov edx, 0x4f
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.180035690
mov edx, eax
jmp 0x18004f805
mov r8d, dword [rsp + 0x98]
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], r14d
mov dword [rax + rcx*8 + 8], r8d
mov dword [rax + rcx*8 + 0xc], esi
mov qword [rax + rcx*8 + 0x10], 0
mov word [rax + rcx*8], 0x4f
mov rcx, qword [rbx]
cmp byte [rcx + 0x55], 0
je 0x18004f81d
mov r8, rbp
mov edx, 0xfffffffc
call fcn.180036130
jmp 0x18004f85c
test edx, edx
jns 0x18004f826
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 0x18004f84f
mov r9d, 0xfffffffc
mov r8, rbp
mov rcx, rbx
call fcn.1800363f0
jmp 0x18004f85c
test rbp, rbp
je 0x18004f85c
mov qword [rdx + 0x10], rbp
mov byte [rdx + 1], 0xfc
mov rax, qword [rbx]
cmp byte [rax + 0x55], 0
jne 0x18004f87d
movsxd rax, dword [rbx + 0x3c]
mov rcx, qword [rbx + 8]
lea rdx, [rax + rax*2]
movzx eax, byte [rsp + 0x90]
mov byte [rcx + rdx*8 - 0x15], al
mov edx, dword [rsp + 0x34]
test edx, edx
je 0x18004f8c1
movzx r8d, byte [rdi + 0x1f]
cmp r8b, 8
jae 0x18004f8c1
xor ecx, ecx
lea rax, [rdi + 0x90]
nop dword [rax]
cmp dword [rax + 0xc], edx
je 0x18004f8bd
inc ecx
add rax, 0x14
cmp ecx, 0xa
jl 0x18004f8a0
movzx eax, r8b
mov dword [rdi + rax*4 + 0x28], edx
inc byte [rdi + 0x1f]
jmp 0x18004f8c1
mov byte [rax + 6], 1
mov rax, qword [rsp + 0x38]
inc r13d
add rax, 0x28
mov qword [rsp + 0x38], rax
cmp r13d, dword [r15]
jl 0x18004f640
mov esi, dword [rsp + 0xa0]
xor r8d, r8d
test r12d, r12d
je 0x18004f9a2
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
cmp dword [rax + 0x64], ecx
jg 0x18004f91d
mov r9d, dword [rsp + 0xa8]
mov dword [rsp + 0x20], r8d
mov edx, 0x4c
mov r8d, r12d
mov rcx, rbx
call fcn.180035690
xor r8d, r8d
jmp 0x18004f950
mov edx, dword [rsp + 0xa8]
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], r12d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r8d
mov qword [rax + rcx*8 + 0x10], r8
mov word [rax + rcx*8], 0x4c
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
cmp dword [rax + 0x64], ecx
jg 0x18004f976
mov dword [rsp + 0x20], r8d
xor r8d, r8d
mov r9d, esi
lea edx, [r8 + 0xd]
mov rcx, rbx
call fcn.180035690
jmp 0x18004f9a2
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], esi
mov dword [rax + rcx*8 + 0xc], r8d
mov qword [rax + rcx*8 + 0x10], r8
mov word [rax + rcx*8], ntohs
mov rdx, qword [rbx + 0x30]
mov rcx, qword [rdx + 0x88]
test rcx, rcx
je 0x18004f9ca
movsxd rax, dword [rsp + 0x98]
lea rax, [rax*4 + 4]
sub rcx, rax
mov eax, dword [rbx + 0x3c]
mov dword [rcx], eax
mov eax, dword [rbx + 0x3c]
xor r13d, r13d
dec eax
mov dword [rdx + 0x6c], eax
test r12d, r12d
je 0x18004fd9e
movzx edx, byte [rdi + 0x1f]
cmp dl, 8
jae 0x18004fd9e
mov ecx, r13d
lea rax, [rdi + 0x90]
cmp dword [rax + 0xc], r12d
je 0x18004fa16
inc ecx
add rax, 0x14
cmp ecx, 0xa
jl 0x18004f9f5
movzx eax, dl
mov dword [rdi + rax*4 + 0x28], r12d
inc byte [rdi + 0x1f]
jmp 0x18004fd9e
mov byte [rax + 6], 1
jmp 0x18004fd9e
mov rax, qword [rsi + 0x10]
movzx ecx, byte [rax]
cmp cl, 0x9c
je 0x18004fa30
cmp cl, 0x9b
jne 0x18004fa36
mov rax, qword [rax + 0x10]
jmp 0x18004fa23
movzx ecx, byte [rax]
cmp cl, 0x9d
jne 0x18004fa42
movzx ecx, byte [rax + 0x36]
lea r12, [0x1802423a0]
cmp cl, 0x61
je 0x18004fbb4
cmp cl, 0x83
jbe 0x18004fa96
cmp cl, 0x86
jbe 0x18004fbb4
cmp cl, 0x98
jne 0x18004fa96
test dword [rax + 4], 0x100000
jne 0x18004fa96
movzx ecx, word [rax + 0x30]
test cx, cx
js 0x18004fbb4
mov rax, qword [rax + 0x40]
movsx rdx, cx
mov rcx, qword [rax + 8]
shl rdx, 5
cmp byte [rdx + rcx + 0x18], 0
jne 0x18004fbb4
cmp ebp, r15d
jne 0x18004fafa
mov rax, qword [rbx + 0x30]
movsxd rcx, dword [rbx + 0x3c]
cmp dword [rax + 0x64], ecx
jg 0x18004fac8
mov r9d, ebp
mov r8d, r14d
mov edx, 0x4c
mov rcx, rbx
mov dword [rsp + 0x20], 0
call fcn.180035690
jmp 0x18004fbb4
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
xor edx, edx
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov byte [rax + rcx*8 + 3], 0
mov dword [rax + rcx*8 + 4], r14d
mov dword [rax + rcx*8 + 8], ebp
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], rdx
mov word [rax + rcx*8], 0x4c
jmp 0x18004fbb4
mov r8d, r14d
mov edx, 0x4d
mov rcx, rbx
call fcn.1800357f0
mov rcx, qword [rbx + 0x30]
movsxd rdx, dword [rbx + 0x3c]
mov r8d, dword [rsi + 0x2c]
mov ebp, eax
cmp dword [rcx + 0x64], edx
jg 0x18004fb37
mov r9d, r15d
mov edx, WSAGetLastError
mov rcx, rbx
mov dword [rsp + 0x20], 0
call fcn.180035690
jmp 0x18004fb65
lea rcx, [rdx + rdx*2]
lea eax, [rdx + 1]
xor edx, edx
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], r15d
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], rdx
mov word [rax + rcx*8], WSAGetLastError
mov edx, dword [rsp + 0xa8]
mov rcx, rbx
call fcn.180035860
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 0x18004fb8d
lea ebp, [rdx - 1]
mov rax, qword [rbx]
cmp byte [rax + 0x55], 0
je 0x18004fb9b
mov rax, r12
jmp 0x18004fbaa
movsxd rax, ebp
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
lea rax, [rax + rcx*8]
mov ebp, dword [rsp + 0xa8]
mov dword [rax + 8], edx
mov rax, qword [rbx + 0x30]
cmp r13d, 1
jne 0x18004fc2e
movsxd rcx, dword [rbx + 0x3c]
xor r13d, r13d
cmp dword [rax + 0x64], ecx
jg 0x18004fbe3
lea edx, [r13 + 0x26]
mov r9d, r15d
mov r8d, r14d
mov rcx, rbx
mov dword [rsp + 0x20], r13d
call fcn.180035690
jmp 0x18004fc10
lea rdx, [rcx + rcx*2]
lea eax, [rcx + 1]
mov dword [rbx + 0x3c], eax
mov rax, qword [rbx + 8]
mov byte [rax + rdx*8 + 3], 0
mov dword [rax + rdx*8 + 4], r14d
mov dword [rax + rdx*8 + 8], r15d
mov dword [rax + rdx*8 + 0xc], r13d
mov qword [rax + rdx*8 + 0x10], r13
mov word [rax + rdx*8], 0x26
mov r8d, dword [rsi + 0x2c]
mov r9d, r15d
mov edx, 0x46
mov rcx, rbx
mov dword [rsp + 0x20], r14d
call fcn.1800356f0
jmp 0x18004fd9e
movsxd rdx, dword [rbx + 0x3c]
xor r13d, r13d
cmp dword [rax + 0x64], edx
jg 0x18004fc56
lea r9d, [r13 + 1]
lea edx, [r13 + 0x30]
mov r8d, r14d
mov rcx, rbx
mov dword [rsp + 0x20], r13d
call fcn.180035690
mov edx, eax
jmp 0x18004fc82
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], r14d
mov qword [rax + rcx*8 + 8], 1
mov qword [rax + rcx*8 + 0x10], r13
mov word [rax + rcx*8], gethostbyname
mov rcx, qword [rbx]
cmp byte [rcx + 0x55], 0
je 0x18004fc9f
lea r8, [rsp + 0x90]
mov edx, 1
call fcn.180036130
jmp 0x18004fccd
test edx, edx
jns 0x18004fca8
mov edx, dword [rbx + 0x3c]
dec edx
movsxd rax, edx
lea r8, [rsp + 0x90]
mov r9d, 1
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
lea rdx, [rax + rcx*8]
mov rcx, rbx
call fcn.1800363f0
cmp dword [rsp + 0x30], 0
mov r8d, dword [rsi + 0x2c]
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], r14d
mov rcx, rbx
jne 0x18004fcfa
mov r9d, r15d
mov edx, 0x44
call fcn.180035c40
jmp 0x18004fd9e
xor r9d, r9d
lea edx, [r9 + 0x45]
call fcn.180035c40
mov rcx, qword [rbx + 0x30]
movsxd rdx, dword [rbx + 0x3c]
mov r8d, dword [rsp + 0x30]
mov esi, eax
cmp dword [rcx + 0x64], edx
jg 0x18004fd31
mov r9d, ebp
mov edx, 0x4c
mov rcx, rbx
mov dword [rsp + 0x20], r13d
call fcn.180035690
jmp 0x18004fd5d
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], ebp
mov dword [rax + rcx*8 + 0xc], r13d
mov qword [rax + rcx*8 + 0x10], r13
mov word [rax + rcx*8], 0x4c
mov edx, r15d
mov rcx, rbx
call fcn.180035860
mov r11d, dword [rbx + 0x3c]
mov rax, qword [rbx + 0x30]
dec r11d
mov dword [rax + 0x6c], r11d
mov edx, dword [rbx + 0x3c]
test esi, esi
jns 0x18004fd81
lea esi, [rdx - 1]
mov rax, qword [rbx]
cmp byte [rax + 0x55], 0
jne 0x18004fd99
movsxd rax, esi
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 8]
lea r12, [rax + rcx*8]
mov dword [r12 + 8], edx
mov r15, qword [rsp + 0x48]
mov r12, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x70]
test r14d, r14d
je 0x18004fdf2
movzx edx, byte [rdi + 0x1f]
cmp dl, 8
jae 0x18004fdf2
mov ecx, r13d
lea rax, [rdi + 0x90]
nop
cmp dword [rax + 0xc], r14d
je 0x18004fdee
inc ecx
add rax, 0x14
cmp ecx, 0xa
jl 0x18004fdd0
movzx eax, dl
mov dword [rdi + rax*4 + 0x28], r14d
inc byte [rdi + 0x1f]
jmp 0x18004fdf2
mov byte [rax + 6], 1
dec dword [rdi + 0x78]
mov r14, qword [rsp + 0x50]
lea rcx, [rdi + 0x9c]
mov r8d, 0xa
mov edx, dword [rcx]
test edx, edx
je 0x18004fe34
mov eax, dword [rdi + 0x78]
cmp dword [rcx - 4], eax
jle 0x18004fe34
cmp byte [rcx - 6], 0
je 0x18004fe31
movzx eax, byte [rdi + 0x1f]
cmp al, 8
jae 0x18004fe2d
movzx eax, al
mov dword [rdi + rax*4 + 0x28], edx
inc byte [rdi + 0x1f]
mov byte [rcx - 6], 0
mov dword [rcx], r13d
add rcx, 0x14
dec r8
jne 0x18004fe07
add rsp, 0x78
pop r13
pop rdi
ret