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

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov qword [rsp + 0x88], rbp
mov ebp, dword [rsp + 0xb0]
cmp ebp, 0x12
jae 0x1400053af
mov eax, 0x80004005
mov rbp, qword [rsp + 0x88]
add rsp, 0x98
ret
mov qword [rsp + 0x78], rdi
mov rdi, qword [rsp + 0xa8]
movzx r8d, byte [rdi + 1]
test r8b, 0xfe
je 0x1400053d1
mov eax, 0x80004005
jmp 0x140005a14
mov qword [rsp + 0x60], r14
movzx r14d, byte [rdi + 2]
test r14d, 0xfffffff4
je 0x1400053ee
mov eax, 0x80004005
jmp 0x140005a0f
cmp word [rdi + 0xc], 0
je 0x1400053e4
cmp word [rdi + 0xe], 0
je 0x1400053e4
movzx ecx, byte [rdi + 7]
mov qword [rsp + 0x80], rsi
xor esi, esi
lea r9d, [rcx + 7]
mov qword [rsp + 0x58], r15
mov r15d, reloc.WS2_32.dll_setsockopt
shr r9d, 3
test r8b, r8b
je 0x140005457
sub ecx, 0xf
je 0x140005452
dec ecx
je 0x14000544b
sub ecx, 8
je 0x140005444
cmp ecx, 8
je 0x14000543f
mov eax, 0x80004005
jmp 0x140005a02
mov esi, r15d
jmp 0x140005457
mov esi, reloc.WS2_32.dll_sendto
jmp 0x140005457
mov esi, Ordinal_27
jmp 0x140005457
mov esi, Ordinal_27
movzx ecx, byte [rdi + 0x10]
mov qword [rsp + 0x68], r13
mov edx, r14d
lea r13d, [rcx + 7]
and edx, 3
shr r13d, 3
dec edx
mov dword [rsp + 0x38], r13d
je 0x1400054c1
dec edx
je 0x14000548c
dec edx
jne 0x14000549f
cmp cl, 8
jne 0x14000549f
mov r15d, reloc.WLDAP32.dll_Ordinal_50
jmp 0x1400054d1
sub ecx, 0xf
je 0x1400054b9
dec ecx
je 0x1400054b1
sub ecx, 8
je 0x1400054a9
cmp ecx, 8
je 0x1400054d1
mov eax, 0x80004005
jmp 0x1400059fd
mov r15d, reloc.WS2_32.dll_sendto
jmp 0x1400054d1
mov r15d, Ordinal_27
jmp 0x1400054d1
mov r15d, Ordinal_27
jmp 0x1400054d1
test r8b, r8b
je 0x14000549f
cmp cl, 8
jne 0x14000549f
mov r15d, reloc.WLDAP32.dll_Ordinal_41
movzx ecx, byte [rdi + 0x11]
xor edx, edx
and r14d, 8
movzx eax, cl
mov dword [rsp + 0x24], r14d
and al, 0x20
cmp al, 0x20
sete dl
xor r8d, r8d
and cl, 0x10
cmp cl, 0x10
movzx ecx, byte [rdi]
mov dword [rsp + 0x30], edx
setne r8b
add ebp, 0xffffffee
cmp ebp, ecx
mov dword [rsp + 0x28], r8d
jb 0x14000549f
mov qword [rsp + 0x90], rbx
movzx eax, cl
sub ebp, ecx
movzx ecx, word [rdi + 5]
mov qword [rsp + 0x70], r12
lea r12, [rax + rdi + 0x12]
mov ebx, ecx
imul ebx, r9d
cmp ebp, ebx
mov dword [rsp + 0x20], ebx
jae 0x14000553d
mov eax, 0x80004005
jmp 0x1400059f0
mov rbx, qword [rsp + 0xa0]
cmp dword [rbx + 0x4c], 0
je 0x14000577c
cmp r15d, 0x29
jne 0x14000577c
movzx eax, word [rdi + 3]
add eax, ecx
cmp eax, 0x100
jg 0x140005533
mov ecx, 0x400
call fcn.1401130c4
test rax, rax
mov qword [rbx + 0x10], rax
jne 0x140005583
mov eax, 0x8007000e
jmp 0x1400059f0
mov r8d, 0x400
mov edx, 0xff
mov rcx, rax
mov dword [rbx + 0x48], 1
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rbx + 0x10]
movzx ecx, word [rdi + 3]
mov r11, r12
mov dword [rsp + 0x40], 0
lea r8, [rax + rcx*4]
movzx eax, word [rdi + 5]
lea r14, [r8 + rax*4]
cmp r8, r14
jae 0x140005720
mov r9d, dword [rsp + 0x20]
mov r10d, dword [rsp + 0x20]
mov ebx, dword [rsp + 0x20]
mov edi, dword [rsp + 0x20]
mov r13d, dword [rsp + 0x40]
nop
mov ecx, esi
sub ecx, 0x14
je 0x1400056c7
dec ecx
je 0x1400056a3
sub ecx, 3
je 0x140005657
dec ecx
jne 0x1400056df
movzx edx, word [r11]
mov eax, edx
mov ecx, edx
mov r9d, edx
shr eax, 0xa
and edx, 0x1f
shr ecx, 5
and eax, 0x1f
and ecx, 0x1f
shr r9d, 0xf
mov r10d, eax
shl eax, 3
mov ebx, ecx
imul r9d, r9d, 0xff
shr r10d, 2
shr ebx, 2
mov edi, edx
or r10d, eax
lea eax, [rcx*8]
shr edi, 2
or ebx, eax
lea eax, [rdx*8]
or edi, eax
add r11, 2
jmp 0x1400056df
movzx edx, word [r11]
mov r9d, 0xff
mov eax, edx
mov ecx, edx
and edx, 0x1f
shr eax, 0xa
shr ecx, 5
mov edi, edx
and eax, 0x1f
and ecx, 0x1f
shr edi, 2
mov r10d, eax
shl eax, 3
mov ebx, ecx
shr r10d, 2
shr ebx, 2
or r10d, eax
lea eax, [rcx*8]
or ebx, eax
lea eax, [rdx*8]
or edi, eax
add r11, 2
jmp 0x1400056df
mov ecx, dword [r11]
mov eax, ecx
mov r9d, ecx
movzx edi, cl
shr eax, 0x10
shr r9d, 0x18
movzx r10d, al
mov eax, ecx
shr eax, 8
add r11, 4
movzx ebx, al
jmp 0x1400056df
movzx r10d, byte [r11 + 2]
movzx ebx, byte [r11 + 1]
movzx edi, byte [r11]
add r11, 3
mov r9d, 0xff
xor eax, eax
test r9d, r9d
mov byte [r8], r10b
setne al
mov byte [r8 + 1], bl
mov byte [r8 + 2], dil
mov byte [r8 + 3], r9b
add r8, 4
or r13d, eax
cmp r8, r14
jb 0x1400055e0
test r13d, r13d
mov r13d, dword [rsp + 0x38]
jne 0x14000574e
mov rdi, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
movzx ecx, word [rdi + 3]
mov rax, qword [rbx + 0x10]
lea rdx, [rax + rcx*4]
cmp rdx, r14
jae 0x14000576e
mov byte [rdx + 3], 0xff
add rdx, 4
cmp rdx, r14
jb 0x140005731
mov r14d, dword [rsp + 0x24]
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
jmp 0x14000577c
mov r14d, dword [rsp + 0x24]
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
mov rdi, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
jmp 0x14000577c
mov r14d, dword [rsp + 0x24]
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x20]
xor r9d, r9d
mov eax, ecx
sub ebp, ecx
movzx ecx, word [rdi + 0xe]
add r12, rax
movzx eax, word [rdi + 0xc]
mov dword [rbx], r15d
mov r15, qword [rsp + 0xa0]
imul ecx, eax
imul ecx, r13d
mov qword [r15 + 8], r12
movzx eax, word [rdi + 0xc]
mov dword [r15 + 0x40], r9d
imul eax, r13d
cmp dword [r15 + 0x4c], r9d
mov dword [r15 + 0x3c], eax
movzx eax, word [rdi + 0xc]
mov dword [r15 + 0x18], eax
movzx eax, word [rdi + 0xe]
mov dword [r15 + 0x20], 1
mov dword [r15 + 0x1c], eax
je 0x1400059ee
test r14d, r14d
jne 0x1400057fd
test edx, edx
je 0x1400057fd
test r8d, r8d
je 0x1400057fd
cmp ebp, ecx
jb 0x140005533
mov qword [r15 + 8], r12
mov dword [r15 + 0x44], r9d
jmp 0x140005987
mov ecx, ecx
call fcn.1401130c4
test rax, rax
mov rdx, rax
mov qword [rsp + 0x38], rax
mov qword [r15 + 8], rax
je 0x140005579
mov ecx, dword [rsp + 0x30]
mov dword [r15 + 0x44], 1
test ecx, ecx
jne 0x14000583e
movzx eax, word [rdi + 0xe]
dec eax
imul eax, dword [r15 + 0x3c]
mov eax, eax
add rdx, rax
mov qword [rsp + 0x38], rdx
movsxd rax, dword [rsp + 0x28]
xor r9d, r9d
movsxd r8, r14d
cmp word [rdi + 0xe], r9w
movsxd r10, ecx
mov dword [rsp + 0x24], r9d
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x30], r10
jbe 0x140005987
test rax, rax
je 0x140005870
mov rsi, rdx
jmp 0x14000587d
mov esi, dword [r15 + 0x3c]
mov eax, r13d
sub rsi, rax
add rsi, rdx
movzx ebx, word [rdi + 0xc]
xor ecx, ecx
test ebx, ebx
je 0x14000594b
nop
nop
test r8, r8
je 0x1400058ba
cmp ebp, 1
jb 0x140005533
movzx ebx, byte [r12]
inc r12
mov r14d, ebx
and ebx, 0x7f
inc ebx
and r14d, 0x80
add ebp, 0xffffffff
jmp 0x1400058bd
xor r14d, r14d
add ecx, ebx
test ebx, ebx
mov dword [rsp + 0x20], ecx
je 0x14000591f
nop
nop
nop
add ebx, 0xffffffff
cmp ebp, r13d
jb 0x140005533
mov r8d, r13d
mov rdx, r12
mov rcx, rsi
mov edi, r13d
call sub.VCRUNTIME140.dll_memcpy
test r14d, r14d
jne 0x1400058f8
add r12, rdi
sub ebp, r13d
movsxd rax, dword [rsp + 0x28]
test rax, rax
je 0x140005907
add rsi, rdi
jmp 0x14000590a
sub rsi, rdi
test ebx, ebx
jne 0x1400058d0
mov ecx, dword [rsp + 0x20]
mov rdi, qword [rsp + 0xa8]
mov r8, qword [rsp + 0x40]
test r14d, r14d
je 0x14000592d
mov eax, r13d
add r12, rax
sub ebp, r13d
movzx ebx, word [rdi + 0xc]
cmp ecx, ebx
jb 0x140005890
mov rdx, qword [rsp + 0x38]
mov r15, qword [rsp + 0xa0]
mov r9d, dword [rsp + 0x24]
cmp qword [rsp + 0x30], 0
je 0x140005961
mov eax, dword [r15 + 0x3c]
add rdx, rax
mov qword [rsp + 0x38], rdx
jmp 0x14000596d
mov eax, dword [r15 + 0x3c]
sub rdx, rax
mov qword [rsp + 0x38], rdx
movzx eax, word [rdi + 0xe]
inc r9d
cmp r9d, eax
movsxd rax, dword [rsp + 0x28]
mov dword [rsp + 0x24], r9d
jb 0x140005866
cmp dword [r15], 0x19
jne 0x1400059ee
mov rdx, qword [r15 + 8]
mov r9d, dword [r15 + 0x3c]
mov eax, dword [r15 + 0x1c]
imul eax, r9d
mov r8d, eax
add r8, rdx
cmp rdx, r8
jae 0x1400059e2
mov r10d, dword [r15 + 0x18]
nop
lea rcx, [rdx + r10*2]
mov rax, rdx
cmp rdx, rcx
jae 0x1400059d7
nop
bt word [rax], 0xf
jb 0x1400059d2
add rax, 2
cmp rax, rcx
jb 0x1400059c0
jmp 0x1400059d7
cmp rax, rcx
jb 0x1400059e2
mov eax, r9d
add rdx, rax
cmp rdx, r8
jb 0x1400059b0
cmp rdx, r8
jne 0x1400059ee
mov dword [r15], Ordinal_27
xor eax, eax
mov r12, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
mov r13, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x80]
mov r15, qword [rsp + 0x58]
mov r14, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x88]
add rsp, 0x98
ret