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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
xor eax, eax
mov word [rsp + 0x38], ax
mov dword [rsp + 0x3c], 0
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xa8]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x30], rax
jmp 0x14039ab9d
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x30]
add rax, 0x40
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax + 0x14]
cmp dword [rsp + 0x20], eax
jge 0x14039ac14
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xb8]
mov ecx, dword [rcx + 0x44]
cmp dword [rax + 0x1c], ecx
je 0x14039abc5
jmp 0x14039ab85
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xb0]
mov rax, qword [rax + 0x30]
and rax, rcx
test rax, rax
je 0x14039abe0
jmp 0x14039ab85
mov rax, qword [rsp + 0x30]
movzx eax, word [rax + 0x14]
btr eax, 0xb
test eax, eax
jne 0x14039abf3
jmp 0x14039ab85
mov rax, qword [rsp + 0x30]
movzx eax, word [rax + 0x12]
and eax, 0
test eax, eax
je 0x14039ac05
jmp 0x14039ab85
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
jmp 0x14039ab85
mov dword [rsp + 0x40], 0
cmp qword [rsp + 0xc0], 0
je 0x14039accb
mov rax, qword [rsp + 0xc0]
mov eax, dword [rax]
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x20], 0
jmp 0x14039ac4d
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x20], eax
jge 0x14039acb9
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xc0]
mov rax, qword [rcx + rax + 8]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
movzx eax, byte [rax]
cmp eax, 0xa2
jne 0x14039ac96
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0xb8]
mov ecx, dword [rcx + 0x44]
cmp dword [rax + 0x2c], ecx
je 0x14039ac98
jmp 0x14039acb9
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xc0]
movzx eax, byte [rcx + rax + 0x20]
and eax, 2
test eax, eax
je 0x14039acb7
jmp 0x14039acb9
jmp 0x14039ac43
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x20], eax
jne 0x14039accb
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x40], eax
movsxd rax, dword [rsp + 0x3c]
imul rax, rax, 0x14
movsxd rcx, dword [rsp + 0x40]
lea rax, [rax + rcx*8 + 0x70]
mov rdx, rax
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rax]
call fcn.1402ff8a0
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x14039ad19
lea rdx, str.out_of_memory
mov rcx, qword [rsp + 0xa0]
call fcn.140300630
xor eax, eax
jmp 0x14039b0cb
mov eax, 0x60
imul rax, rax, 1
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x70], rax
mov eax, reloc.WS2_32.dll_recv
imul rax, rax, 1
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
movsxd rax, dword [rsp + 0x3c]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x60]
lea rax, [rcx + rax*8]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x3c]
mov dword [rax], ecx
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x40]
mov dword [rax + 0x10], ecx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x60]
mov qword [rax + 0x18], rcx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x80]
mov qword [rax + 0x20], rcx
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0xa8]
mov qword [rax], rcx
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0xa0]
mov qword [rax + 8], rcx
mov dword [rsp + 0x28], 0
mov eax, dword [rsp + 0x28]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xa8]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x30], rax
jmp 0x14039ae1a
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x30]
add rax, 0x40
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax + 0x14]
cmp dword [rsp + 0x20], eax
jge 0x14039b038
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xb8]
mov ecx, dword [rcx + 0x44]
cmp dword [rax + 0x1c], ecx
je 0x14039ae46
jmp 0x14039ae02
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xb0]
mov rax, qword [rax + 0x30]
and rax, rcx
test rax, rax
je 0x14039ae61
jmp 0x14039ae02
mov rax, qword [rsp + 0x30]
movzx eax, word [rax + 0x14]
btr eax, 0xb
test eax, eax
jne 0x14039ae74
jmp 0x14039ae02
mov rax, qword [rsp + 0x30]
movzx eax, word [rax + 0x12]
and eax, 0
test eax, eax
je 0x14039ae89
jmp 0x14039ae02
mov rax, qword [rsp + 0xb8]
movzx eax, byte [rax + 0x3c]
and eax, 8
test eax, eax
je 0x14039aec5
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 4]
and eax, 1
test eax, eax
jne 0x14039aec5
mov rax, qword [rsp + 0x30]
movzx eax, word [rax + 0x14]
and eax, 0x180
test eax, eax
je 0x14039aec5
jmp 0x14039ae02
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x30]
mov edx, dword [rdx + 0x28]
mov dword [rcx + rax], edx
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov edx, dword [rsp + 0x20]
mov dword [rcx + rax + 8], edx
mov rax, qword [rsp + 0x30]
movzx eax, word [rax + 0x14]
and eax, 0x1fff
mov word [rsp + 0x24], ax
movzx eax, word [rsp + 0x24]
cmp eax, 1
jne 0x14039af1b
mov eax, 2
mov word [rsp + 0x24], ax
movzx eax, word [rsp + 0x24]
cmp eax, 0x40
jne 0x14039af45
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x30]
movzx edx, byte [rdx + 0x17]
mov byte [rcx + rax + 4], dl
jmp 0x14039b029
movzx eax, word [rsp + 0x24]
and eax, 0x180
test eax, eax
je 0x14039af8c
movzx eax, word [rsp + 0x24]
cmp eax, 0x100
jne 0x14039af74
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax + 4], 0x47
jmp 0x14039af87
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax + 4], 0x48
jmp 0x14039b029
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
movzx edx, byte [rsp + 0x24]
mov byte [rcx + rax + 4], dl
movzx eax, word [rsp + 0x24]
and eax, 0x3c
test eax, eax
je 0x14039b029
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov rcx, qword [rax + 0x18]
call fcn.140332dd0
test eax, eax
je 0x14039b029
cmp dword [rsp + 0x20], 0x10
jge 0x14039afef
mov eax, dword [rsp + 0x20]
mov ecx, 1
mov dword [rsp + 0x68], ecx
movzx ecx, al
mov eax, dword [rsp + 0x68]
shl eax, cl
movzx ecx, word [rsp + 0x38]
or ecx, eax
mov eax, ecx
mov word [rsp + 0x38], ax
movzx eax, word [rsp + 0x24]
cmp eax, 0x10
jne 0x14039b00c
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax + 4], 8
movzx eax, word [rsp + 0x24]
cmp eax, 4
jne 0x14039b029
movsxd rax, dword [rsp + 0x28]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax + 4], 0x20
mov eax, dword [rsp + 0x28]
inc eax
mov dword [rsp + 0x28], eax
jmp 0x14039ae02
mov dword [rsp + 0x20], 0
jmp 0x14039b04c
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x20], eax
jge 0x14039b0b6
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xc0]
mov rax, qword [rcx + rax + 8]
mov qword [rsp + 0x88], rax
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
movsx ecx, word [rcx + 0x30]
mov rdx, qword [rsp + 0x60]
mov dword [rdx + rax*8], ecx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xc0]
movzx eax, byte [rcx + rax + 0x20]
and eax, 1
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x60]
mov byte [rdx + rcx*8 + 4], al
jmp 0x14039b042
mov rax, qword [rsp + 0xc8]
movzx ecx, word [rsp + 0x38]
mov word [rax], cx
mov rax, qword [rsp + 0x50]
add rsp, 0x98
ret