Function at 0x14004d830
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rdi, rdx
mov rsi, rcx
cmp rdx, qword [rcx + 0x50]
jb 0x14004d86d
add rsi, 0x18
je 0x14004d962
mov qword [rsi], reloc.WS2_32.dll_select
mov eax, 0xffffffff
jmp 0x14004da81
shl rdi, 5
add rdi, qword [rcx + 0x60]
mov rdx, qword [rdi]
test rdx, rdx
je 0x14004da7f
cmp dword [rdx + 4], 0
jne 0x14004da7f
mov edx, dword [rdx + 0x60]
xor r8d, r8d
mov rcx, qword [rcx + 8]
add edx, 0x1a
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jns 0x14004d8c7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
add rsi, 0x18
je 0x14004d962
mov dword [rsi], 4
mov eax, 0xffffffff
mov dword [rsi + 4], ecx
jmp 0x14004da81
mov r9, qword [rsi + 8]
lea rcx, [rsp + 0x50]
mov edx, 4
mov r8d, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 1
je 0x14004d908
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
add rsi, 0x18
je 0x14004d962
mov dword [rsi], 5
mov eax, 0xffffffff
mov dword [rsi + 4], ecx
jmp 0x14004da81
movzx ebp, byte [rsp + 0x53]
mov r12d, 0x100
movzx eax, byte [rsp + 0x52]
imul ebp, r12d
add bp, ax
je 0x14004da50
movzx edx, byte [rsp + 0x51]
lea rbx, [rsi + 0x18]
movzx eax, byte [rsp + 0x50]
mov r8d, 1
mov rcx, qword [rsi + 8]
shl edx, 8
add edx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jns 0x14004d96c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
test rbx, rbx
je 0x14004d962
mov dword [rbx], 4
mov dword [rbx + 4], ecx
mov eax, 0xffffffff
jmp 0x14004da81
mov r15, qword [rsi + 8]
movzx r14d, bp
test r14, r14
je 0x14004d962
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x14004d9a0
test rbx, rbx
je 0x14004d962
mov qword [rbx], recv
mov eax, 0xffffffff
jmp 0x14004da81
mov r9, r15
mov r8, r14
mov edx, 1
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rsi
cmp rax, r14
jae 0x14004da06
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
test eax, eax
je 0x14004d9ef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
test rbx, rbx
je 0x14004d962
mov dword [rbx], 5
mov eax, 0xffffffff
mov dword [rbx + 4], ecx
jmp 0x14004da81
test rbx, rbx
je 0x14004d962
mov qword [rbx], reloc.WS2_32.dll_setsockopt
mov eax, 0xffffffff
jmp 0x14004da81
mov r9, rbx
mov r8d, r12d
movzx edx, bp
call fcn.14004d520
mov rbx, rax
mov rcx, rsi
test rax, rax
jne 0x14004da2c
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, 0xffffffff
jmp 0x14004da81
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call fcn.14004d6a0
mov rcx, qword [rdi]
mov rdx, rax
mov rcx, qword [rcx + 0x40]
call fcn.14004d370
mov rcx, qword [rdi]
mov qword [rcx + 0x40], rax
mov rax, qword [rdi]
mov dword [rax + 4], 1
mov rdx, qword [rdi + 8]
test rdx, rdx
je 0x14004da7f
cmp dword [rdx + 4], 0
jne 0x14004da7f
mov rax, qword [rdi]
mov rcx, qword [rax + 0x40]
mov qword [rdx + 0x40], rcx
mov rax, qword [rdi + 8]
mov dword [rax + 4], 1
xor eax, eax
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret