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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r12
sub rsp, 0x50
mov qword [rsp + 0x70], rsi
mov ebp, ecx
mov qword [rsp + 0x78], r14
mov r14, rdx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14016d360]
mov r12d, eax
call fcn.140035d70
mov rsi, qword [rax]
mov rax, r14
cqo
and edx, 0xf
add rax, rdx
and eax, 0xf
cmp rax, rdx
je 0x140038b22
mov qword [rsp + 0x80], r15
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14016d360]
mov r15d, eax
call fcn.140035d70
mov ecx, dword [reloc.WS2_32.dll_accept]
mov rdx, qword [rax]
cmp ecx, 1
jne 0x140038a7b
cmp dword [0x140167ec8], 0
je 0x140038a43
mov dword [rsp + 0x30], 0x26
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x34], 0x28
mov eax, dword [rdx + 0x18]
mov dword [rsp + 0x38], eax
mov eax, dword [rdx + 0x24]
lea rdx, str.The_stack_is_no_more_16_bytes_aligned__
mov dword [rsp + 0x3c], eax
call fcn.140047630
jmp 0x140038b11
mov ecx, dword [rdx + 0x18]
mov ebx, ecx
and ebx, 0xfffff
inc ebx
call fcn.14004a980
mov rcx, qword [0x14016dc20]
lea r8, str.The_stack_is_no_more_16_bytes_aligned__
mov r9, rax
mov dword [rsp + 0x20], ebx
lea rdx, str._n_Debugger_Warning____s_n_Debugger_Warning___File:__s__Line:__d__n
call fcn.140039f80
jmp 0x140038b11
cmp ecx, 2
jne 0x140038b11
lea rdx, str.Warning
lea rcx, str.Debugger
call fcn.14004b8c0
mov rbx, rax
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x140038aa1
mov rcx, qword [0x140166468]
add r8, 0x2b
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x140038b00
lea r9, str.The_stack_is_no_more_16_bytes_aligned__
mov r8, rbx
lea rdx, str.__s___s
mov rcx, rax
call fcn.1400319a0
mov rdx, rdi
mov ecx, 2
call fcn.140038c70
mov rcx, qword [0x140166468]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140038b11
lea rdx, str.The_stack_is_no_more_16_bytes_aligned__
mov ecx, 2
call fcn.140038c70
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15, qword [rsp + 0x80]
mov eax, dword [rsi + 0x4c]
cmp dword [rsi + 0x48], eax
jl 0x140038b53
mov r8, qword [rsi + 0x40]
add eax, 0x3e80
movsxd r9, eax
mov edx, 8
mov dword [rsi + 0x4c], eax
mov rcx, qword [0x140166468]
shl r9, 5
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rsi + 0x40], rax
movsxd rcx, dword [rsi + 0x48]
xor edi, edi
mov rax, qword [rsi + 0x40]
shl rcx, 5
mov dword [rcx + rax], ebp
movsxd rcx, dword [rsi + 0x48]
mov rax, qword [rsi + 0x40]
shl rcx, 5
mov qword [rcx + rax + 8], r14
movsxd rdx, dword [rsi + 0x48]
mov rcx, qword [rsi + 0x40]
mov eax, dword [rsi + 0x18]
shl rdx, 5
mov dword [rdx + rcx + 0x10], eax
test byte [0x14016dc40], 1
je 0x140038ba4
movsxd rcx, dword [rsi + 0x48]
mov rax, qword [rsi + 0x40]
shl rcx, 5
mov qword [rcx + rax + 0x18], rdi
jmp 0x140038bbf
mov rdx, r14
mov ecx, ebp
call fcn.140053130
movsxd rdx, dword [rsi + 0x48]
mov rcx, qword [rsi + 0x40]
shl rdx, 5
mov qword [rdx + rcx + 0x18], rax
inc dword [rsi + 0x48]
cmp dword [0x140167ec8], edi
mov r14, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x70]
je 0x140038c34
cmp dword [0x1401687ac], edi
jle 0x140038c34
lea rcx, [0x14016dc60]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x1401687ac]
test ecx, ecx
jle 0x140038c27
lea rbx, [0x14016dca0]
nop word [rax + rax]
cmp dword [rbx + 0x20], ebp
jne 0x140038c1d
movzx eax, byte [rbx]
cmp al, 3
je 0x140038c10
cmp al, 6
jne 0x140038c1d
mov ecx, edi
call fcn.140047c90
mov ecx, dword [0x1401687ac]
inc edi
add rbx, 0x40
cmp edi, ecx
jl 0x140038c00
lea rcx, [0x14016dc60]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, ebp
call fcn.1400539e0
movsxd rcx, eax
mov rax, qword [0x14016dc00]
inc dword [rax + rcx*4]
mov ecx, r12d
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r12
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_SetLastError]