Function at 0x140047870
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xa50]
sub rsp, 0xb50
mov rax, qword [0x1400a45f8]
xor rax, rsp
mov qword [rbp + 0xa40], rax
mov rsi, qword [rbp + 0xab0]
mov edi, r9d
mov r13, qword [rbp + 0xac0]
mov r15, rdx
mov qword [rsp + 0x60], rsi
mov ebx, ecx
mov dword [rsp + 0x50], r9d
movsxd r12, r8d
call fcn.140026f10
mov edx, dword [0x1400a3138]
and edx, eax
mov eax, 2
test dl, 1
je 0x1400478e0
lea r14d, [rax - 1]
jmp 0x1400478eb
test al, dl
je 0x140047dbf
mov r14d, eax
lea rcx, [rbp + 0x1a0]
mov dword [rbp + 0x1a0], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [rbp + 0x1b0], 2
mov eax, 6
je 0x140047941
cmp r14d, 2
jne 0x140047952
mov rax, qword [rbp + 0xab8]
mov r9d, edi
mov qword [rsp + 0x30], r13
mov r8d, r12d
mov qword [rsp + 0x28], rax
mov rdx, r15
mov ecx, ebx
mov qword [rsp + 0x20], rsi
call fcn.140048420
jmp 0x140047dc4
cmp r14d, 2
jne 0x140047952
mov edx, r14d
mov r8d, 0x3e8
jmp 0x14004795d
mov eax, 2
mov edx, eax
lea r8d, [rax + 0xf]
mov ecx, eax
call fcn.140026910
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140047975
lea eax, [rdi + 0x40]
jmp 0x140047dc4
lea r9, [rsp + 0x48]
mov qword [0x1400a36c0], rdi
mov edx, 0xffff
mov dword [rsp + 0x48], 1
mov r8d, 0x20
mov dword [rsp + 0x20], 4
mov rcx, rdi
call fcn.1400268a0
mov rcx, qword [0x1400a7378]
call fcn.14004c5d0
or rbx, 0xffffffffffffffff
xor esi, esi
test eax, eax
jne 0x140047a04
mov rcx, qword [0x1400a7378]
call fcn.14004c4f0
test rax, rax
jne 0x1400479dd
mov rcx, rdi
call sub.WSOCK32.dll_closesocket
mov eax, 0x4a
jmp 0x140047dc4
movzx eax, word [rax]
cmp ax, 6
jne 0x1400479ec
cmp r14d, 2
je 0x140047a04
cmp ax, 2
jne 0x1400479f8
cmp r14d, 1
je 0x140047a04
mov dword [0x1400a36b8], 1
jmp 0x140047a10
cmp dword [0x1400a36b8], esi
je 0x140047b12
lea rcx, [0x1400a7378]
call fcn.14004c5e0
cmp r14d, 2
jne 0x140047a86
lea ecx, [r14 + 0xc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x140047a54
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, rdi
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
jmp 0x140047dc4
xor eax, eax
mov qword [rsi], rax
mov dword [rsi + 8], eax
mov word [rsi + 0xc], ax
mov eax, 6
mov word [rsi], ax
movzx ecx, word [0x1400a36b0]
call fcn.1400265e0
mov word [rsi + 0xc], ax
xor eax, eax
mov dword [rsi + 2], eax
mov dword [rsi + 6], ebx
mov word [rsi + 0xa], bx
jmp 0x140047ac1
mov ecx, reloc.WSOCK32.dll_recv
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x140047a34
xor eax, eax
mov qword [rsi], rax
mov qword [rsi + 8], rax
mov eax, 2
mov word [rsi], ax
movzx ecx, word [0x1400a36b0]
call fcn.1400265e0
mov word [rsi + 2], ax
mov dword [rsi + 4], 0xffffffff
mov rdx, rsi
lea rsi, [0x1400a7378]
mov rcx, rsi
call fcn.14004c500
mov rcx, qword [0x1400a7378]
mov qword [0x1400a7358], rsi
call fcn.14004c5d0
test eax, eax
je 0x140047b0a
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, rdi
call sub.WSOCK32.dll_closesocket
mov eax, 0x41
jmp 0x140047dc4
xor esi, esi
mov dword [0x1400a36b8], esi
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
test rax, rax
js 0x1400479cb
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov r8d, 0x3e8
mov dword [rbp + 0x24c], 0xffffffff
cqo
mov dword [rbp + 0x240], 0x2c6
and edx, 0x1fff
mov dword [rbp + 0x248], esi
add rax, rdx
lea rcx, [rbp + 0x250]
and eax, 0x1fff
sub rax, rdx
xor edx, edx
mov dword [rbp + 0x244], eax
call sub.VCRUNTIME140.dll_memset
cmp byte [r15 + rbx + 1], 0
lea rbx, [rbx + 1]
jne 0x140047b72
lea eax, [rbx + 1]
cmp eax, 0x3e8
ja 0x140047b9a
movsxd r8, eax
lea rcx, [rbp + 0x250]
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
mov rbx, qword [0x1400a7378]
mov rcx, rbx
call fcn.14004c5d0
test eax, eax
jne 0x140047c03
nop dword [rax]
mov rcx, rbx
call fcn.14004c4f0
mov rcx, qword [0x1400a36c0]
lea rdx, [rbp + 0x240]
xor r9d, r9d
mov dword [rsp + 0x28], reloc.WSOCK32.dll_recv
mov r8d, 0x1a0
mov qword [rsp + 0x20], rax
call fcn.140026820
cmp eax, 0x1a0
jne 0x140047cb1
mov rcx, rbx
call fcn.14004c5f0
mov rcx, rax
mov rbx, rax
call fcn.14004c5d0
test eax, eax
je 0x140047bb0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov ebx, r14d
xor r15d, r15d
mov r14, qword [rbp + 0xab8]
lea rsi, [rax + r12]
mov r12d, dword [rsp + 0x50]
xor ecx, ecx
mov dword [rsp + 0x5c], r15d
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov ecx, esi
mov dword [rbp - 0x80], 1
sub ecx, eax
lea rdx, [rbp - 0x80]
mov rax, qword [0x1400a36c0]
cmovs ecx, r15d
mov qword [rbp - 0x78], rax
mov dword [rsp + 0x58], ecx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rax + 1]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
call fcn.1400267b0
cmp eax, 0xffffffff
je 0x140047d7d
test eax, eax
je 0x140047d63
mov rcx, qword [0x1400a36c0]
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [rbp + 0x640]
mov r8d, 0x3f8
cmp rbx, 2
jne 0x140047cc3
mov dword [rsp + 0x40], sendto
lea rax, [rbp + 0x190]
jmp 0x140047cd0
mov rcx, rdi
call sub.WSOCK32.dll_closesocket
mov eax, 0x3e
jmp 0x140047dc4
mov dword [rsp + 0x40], reloc.WSOCK32.dll_recv
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
call fcn.140026730
cmp eax, 0xffffffff
je 0x140047c21
mov eax, dword [rbp + 0x244]
cmp dword [rbp + 0x644], eax
jne 0x140047c21
mov eax, dword [rbp + 0x24c]
cmp dword [rbp + 0x64c], eax
jne 0x140047c21
cmp rbx, 2
jne 0x140047d1b
lea rcx, [rbp + 0x190]
call fcn.140028830
jmp 0x140047d24
mov ecx, dword [rsp + 0x6c]
call fcn.140026660
mov r9, qword [rsp + 0x60]
lea rcx, [rbp + 0x650]
mov qword [rsp + 0x28], r13
mov r8d, r12d
mov rdx, rax
mov qword [rsp + 0x20], r14
call fcn.140048170
cmp r12d, 4
jne 0x140047d52
cmp word [r13 + 0x40], r15w
ja 0x140047d63
cmp eax, 0x40
je 0x140047a42
test eax, eax
jne 0x140047c21
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, rdi
call sub.WSOCK32.dll_closesocket
xor eax, eax
jmp 0x140047dc4
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x140047c21
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x140047da7
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, rdi
call sub.WSOCK32.dll_closesocket
mov rax, qword [rsp + 0x60]
cmp dword [rax], r15d
mov eax, r15d
setle al
jmp 0x140047dc4
mov eax, 0x4c
mov rcx, qword [rbp + 0xa40]
xor rcx, rsp
call fcn.140077b10
mov rbx, qword [rsp + 0xb90]
add rsp, 0xb50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret