Function at 0x4b74f0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x9b8
mov rax, qword [sym.imp.libssp_0.dll___stack_chk_guard]
mov rsi, qword [rax]
mov qword [rsp + 0x9a8], rsi
xor esi, esi
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0xa08], edx
mov dword [rsp + 0xa10], r8d
cmp r8d, 0xffffffff
jl 0x4b7cc8
jne 0x4b7c3f
mov rax, qword [0x005f2a98]
mov byte [rsp + 0x5f], 0
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x74], 0
test rax, rax
je 0x4b7c75
mov esi, dword [rsp + 0xa08]
mov r14, qword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [rsi - 1]
mov rsi, qword [rsp + 0x50]
lea r13, [rsi + rdx*8 + 8]
lea rsi, [rsp + 0x120]
mov qword [rsp + 0x38], rsi
lea rsi, [rsp + 0x330]
mov qword [rsp + 0x48], rsi
lea rsi, [rsp + 0x540]
mov qword [rsp + 0x40], rsi
lea rsi, [rsp + 0x750]
mov qword [rsp + 0x60], rsi
mov r10d, dword [rsp + 0xa08]
mov qword [rsp + 0x750], rax
mov dword [rsp + 0x120], 0
mov dword [rsp + 0x330], 0
mov dword [rsp + 0x540], 0
test r10d, r10d
je 0x4b7c23
mov rbx, qword [rsp + 0x50]
mov rsi, qword [sym.imp.msvcrt.dll__get_osfhandle]
mov ebp, 1
mov rdi, qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov r12d, dword [rsp + 0xa10]
jmp 0x4b7689
xor edx, edx
lea r8, [rsp + 0xf0]
mov rcx, r15
mov dword [rsp + 0xf0], 0xdeadbeef
call rdi
cmp dword [rsp + 0xf0], 0xdeadbeef
je 0x4b76c4
mov edx, dword [rsp + 0x8c]
mov r8d, 0x20
test dl, 0x41
jne 0x4b7b72
test edx, 0x304
jne 0x4b7b07
and edx, 0x82
jne 0x4b7a9f
mov rdx, qword [0x005f2a98]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
nop dword [rax]
add rbx, 8
cmp r13, rbx
je 0x4b7707
movsx edx, word [rbx + 4]
mov ecx, dword [rbx]
xor r9d, r9d
mov word [rbx + 6], r9w
mov dword [rsp + 0x8c], edx
mov eax, edx
test ecx, ecx
js 0x4b7680
test ax, 0x3c7
je 0x4b7680
call rsi
mov r15, rax
test rax, rax
je 0x4b77c0
and eax, 3
cmp eax, 3
jne 0x4b7610
lea rdx, [rsp + 0x8c]
mov rcx, r15
call fcn.004b7310
mov r8d, dword [rsp + 0x8c]
mov word [rbx + 6], ax
test r8d, r8d
je 0x4b76f2
mov edx, ebp
add ebp, 1
mov qword [rsp + rdx*8 + 0x750], r15
test ax, ax
mov eax, 0
cmovne r12d, eax
add rbx, 8
cmp r13, rbx
jne 0x4b7689
mov dword [rsp + 0xa10], r12d
lea rax, [0x005f2a90]
xor ecx, ecx
mov r9, qword [rsp + 0x40]
xor edi, edi
mov qword [rsp + 0x20], rax
mov r8, qword [rsp + 0x48]
xor r12d, r12d
mov rdx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_select]
mov rsi, qword [sym.imp.USER32.dll_PeekMessageA]
mov r15, qword [rsp + 0x60]
test eax, eax
mov eax, 1
cmovle r12d, dword [rsp + 0xa10]
cmovg eax, edi
mov dword [rsp + 0x58], eax
nop word [rax + rax]
xor r8d, r8d
mov dword [rsp + 0x20], 0x4ff
mov r9d, r12d
mov ecx, ebp
mov rdx, r15
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, ebp
jne 0x4b77e0
mov rdi, qword [sym.imp.USER32.dll_DispatchMessageA]
lea rbx, [rsp + 0x90]
nop dword [rax]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 1
mov rcx, rbx
call rsi
test eax, eax
je 0x4b7760
mov rcx, rbx
call r14
mov rcx, rbx
call rdi
jmp 0x4b7790
mov r8d, 0x1d8
lea rdx, str.compat_poll_poll.c
lea rcx, str.h___NULL
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x4b7610
mov ecx, dword [rsp + 0x58]
test ecx, ecx
jne 0x4b7a77
mov edx, dword [rsp + 0xa08]
mov qword [rsp + rbp*8 + 0x750], 0
test edx, edx
je 0x4b7c2d
mov dword [rsp + 0x58], 1
mov rbx, qword [rsp + 0x50]
xor r12d, r12d
jmp 0x4b787d
mov eax, esi
mov r10d, esi
movzx edi, word [rbx + 4]
and eax, 0x29
and r10d, 4
cmp eax, 8
je 0x4b7944
test eax, eax
jne 0x4b79ea
and esi, 0x12
je 0x4b7850
mov edx, edi
and edx, 0x304
or eax, edx
and edi, 0x82
mov edx, eax
or eax, edi
test r10d, r10d
cmove eax, edx
or ax, word [rbx + 6]
mov word [rbx + 6], ax
cmp ax, 1
sbb r12d, 0xffffffff
add rbx, 8
cmp rbx, r13
je 0x4b7978
mov ecx, dword [rbx]
test ecx, ecx
js 0x4b7870
test word [rbx + 4], 0x345
je 0x4b7870
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r15, rax
mov eax, dword [rsp + 0x58]
cmp qword [rsp + rax*8 + 0x750], r15
je 0x4b7950
xor edx, edx
lea r8, [rsp + 0xc0]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
xor edx, edx
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rdx, qword [rsp + 0x38]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b78ed
mov eax, dword [rsp + 0xc0]
test al, 9
jne 0x4b78ed
or eax, 9
mov dword [rsp + 0xc0], eax
mov rdx, qword [rsp + 0x48]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b7906
or dword [rsp + 0xc0], 0x12
mov rdx, qword [rsp + 0x40]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
mov esi, dword [rsp + 0xc0]
test eax, eax
je 0x4b7820
or esi, 4
movzx edi, word [rbx + 4]
mov r10d, 4
mov eax, esi
mov dword [rsp + 0xc0], esi
and eax, 0x29
cmp eax, 8
jne 0x4b7839
mov eax, edi
and eax, 0x41
jmp 0x4b7841
movsx eax, word [rbx + 4]
lea rdx, [rsp + 0x8c]
mov rcx, r15
mov dword [rsp + 0x8c], eax
call fcn.004b7310
add dword [rsp + 0x58], 1
jmp 0x4b7860
test r12d, r12d
movzx eax, byte [rsp + 0x5f]
sete bl
and eax, ebx
test al, al
je 0x4b79b7
cmp dword [rsp + 0xa10], 0xffffffff
je 0x4b79ce
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov edx, dword [rsp + 0x74]
sub rax, qword [rsp + 0x78]
mov rsi, rdx
cmp rdx, rax
jbe 0x4b7be7
sub esi, eax
mov dword [rsp + 0xa10], esi
mov eax, dword [rsp + 0xa10]
test eax, eax
je 0x4b7cba
test bl, bl
je 0x4b7cba
mov edx, 1
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_SleepEx]
mov rax, qword [0x005f2a98]
jmp 0x4b75b0
mov r11, qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x70], r10d
xor ecx, ecx
mov qword [rsp + 0x68], r11
call r11
mov rcx, r15
mov r9d, 2
lea rdx, [rsp + 0x960]
mov r8d, 0x40
call qword [sym.imp.WS2_32.dll_recv]
mov r15d, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
mov r11, qword [rsp + 0x68]
mov ebp, eax
call r11
test r15d, r15d
mov r10d, dword [rsp + 0x70]
jg 0x4b7944
cmp ebp, 0x2749
je 0x4b7944
test r15d, r15d
je 0x4b7c19
cmp ebp, 0x274a
je 0x4b7c19
sub ebp, 0x2744
cmp ebp, 3
sbb eax, eax
and eax, 8
add eax, 8
jmp 0x4b7841
lea rax, [0x005f2a90]
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov rdx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_select]
jmp 0x4b77ec
mov ecx, dword [rsp + 0x540]
or r8d, 4
test ecx, ecx
je 0x4b7c91
lea edx, [rcx - 1]
mov r9, qword [rsp + 0x40]
mov eax, 1
add rdx, 2
nop dword [rax + rax]
cmp qword [r9 + rax*8], r15
je 0x4b7669
mov r10d, eax
add rax, 1
cmp rdx, rax
jne 0x4b7ac8
cmp r10d, ecx
jne 0x4b7669
cmp ecx, 0x40
je 0x4b7669
add ecx, 1
mov qword [rsp + r10*8 + 0x548], r15
mov dword [rsp + 0x540], ecx
jmp 0x4b7669
mov r11d, dword [rsp + 0x330]
or r8d, 0x12
test r11d, r11d
je 0x4b7c9e
lea ecx, [r11 - 1]
mov r9, qword [rsp + 0x48]
mov eax, 1
add rcx, 2
nop
cmp qword [r9 + rax*8], r15
je 0x4b765d
mov r10d, eax
add rax, 1
cmp rcx, rax
jne 0x4b7b30
cmp r11d, 0x40
je 0x4b765d
cmp r10d, r11d
jne 0x4b765d
add r11d, 1
mov qword [rsp + r10*8 + 0x338], r15
mov dword [rsp + 0x330], r11d
jmp 0x4b765d
mov r8d, dword [rsp + 0x120]
test r8d, r8d
je 0x4b7cac
lea ecx, [r8 - 1]
mov r9, qword [rsp + 0x38]
mov eax, 1
add rcx, 2
jmp 0x4b7bac
mov r10d, eax
add rax, 1
cmp rax, rcx
je 0x4b7bbd
cmp qword [r9 + rax*8], r15
jne 0x4b7ba0
mov r8d, 0x29
jmp 0x4b7651
cmp r8d, 0x40
je 0x4b7bb2
cmp r10d, r8d
jne 0x4b7bb2
add r8d, 1
mov dword [rsp + 0x120], r8d
mov r8d, 0x29
mov qword [rsp + r10*8 + 0x128], r15
jmp 0x4b7651
xor r13d, r13d
mov rax, qword [sym.imp.libssp_0.dll___stack_chk_guard]
mov rsi, qword [rsp + 0x9a8]
xor rsi, qword [rax]
jne 0x4b7cdf
mov eax, r13d
add rsp, 0x9b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0x10
jmp 0x4b7841
mov ebp, 1
jmp 0x4b770f
movzx eax, byte [rsp + 0x5f]
mov ebx, 1
xor r12d, r12d
jmp 0x4b7985
mov eax, dword [rsp + 0xa10]
mov dword [rsp + 0x74], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov r11d, dword [rsp + 0xa10]
mov qword [rsp + 0x78], rax
mov rax, qword [0x005f2a98]
test r11d, r11d
setne byte [rsp + 0x5f]
test rax, rax
jne 0x4b7561
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x005f2a98], rax
jmp 0x4b7561
xor r10d, r10d
mov ecx, 1
jmp 0x4b7af3
xor r10d, r10d
mov r11d, 1
jmp 0x4b7b5d
xor r10d, r10d
mov r8d, 1
jmp 0x4b7bcc
mov r13d, r12d
jmp 0x4b7bea
call qword [sym.imp.msvcrt.dll__errno]
mov r13d, 0xffffffff
mov dword [rax], 0x16
jmp 0x4b7bea
call sub.libssp_0.dll___stack_chk_fail
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop