Function at 0x140049ee0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
sub rsp, 0x80
mov rdi, r8
mov rbp, rcx
cmp r9d, 0x16
jge 0x140049f21
test r8, r8
je 0x140049f96
mov dword [r8], reloc.WS2_32.dll_send
xor eax, eax
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
mov edx, 0x1002a
mov r8d, 2
cmp r9d, edx
cmovl edx, r9d
neg edx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
cmp eax, 0xffffffff
jne 0x140049f63
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0x1b
je 0x140049f63
test rdi, rdi
je 0x140049f96
mov dword [rdi], 4
xor eax, eax
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov ecx, 0x1002a
mov dword [rsp + 0xa8], eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x48], rax
mov rsi, rax
test rax, rax
jne 0x140049fa3
test rdi, rdi
je 0x140049f96
mov dword [rdi], recv
xor eax, eax
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
mov r9, rbp
mov edx, 1
mov r8d, 0x1002a
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rbp
mov qword [rsp + 0x40], rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
test eax, eax
je 0x140049ff6
test rdi, rdi
je 0x140049fe0
mov dword [rdi], 5
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0x78], r12
xor r12d, r12d
mov qword [rsp + 0x70], r13
cmp rax, 0x1002a
mov qword [rsp + 0x68], r14
mov r13d, socket
cmovb r13d, r12d
mov qword [rsp + 0x60], r15
add r13, rsi
mov qword [rsp + 0x50], reloc.WS2_32.dll_send
mov r15, 0xffffffffffffffff
mov r14d, r12d
sub rax, r13
lea rbx, [rsi - 0x12]
add rbx, rax
cmp rbx, 4
jb 0x14004a0b5
lea r8, [rbx - 3]
mov edx, 0x50
mov rcx, r13
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
je 0x14004a0b5
movzx edi, byte [reloc.WS2_32.dll_getsockname]
movzx esi, word [0x14014b731]
nop word [rax + rax]
cmp word [r9 + 1], si
lea rcx, [r9 + 1]
jne 0x14004a091
cmp byte [rcx + 2], dil
je 0x14004a0fa
mov r8, rbx
mov edx, 0x50
sub r8, r9
add r8, 0xfffffffffffffffc
add r8, r13
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
jne 0x14004a080
mov rsi, qword [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r13, qword [rsp + 0x70]
test r15, r15
mov r15, qword [rsp + 0x60]
jns 0x14004a2a0
movsxd rbx, dword [rsp + 0x50]
lea rcx, [0x1401434c0]
cmp ebx, 0x1b
ja 0x14004a285
cmp dword [rcx + rbx*4], r12d
je 0x14004a271
mov r12d, dword [rsp + 0x54]
jmp 0x14004a276
mov rsi, qword [rsp + 0x48]
test r9, r9
je 0x14004a0b5
mov edx, dword [rsp + 0xa8]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea r13, [r9 + 1]
mov rax, qword [rsp + 0x40]
mov r8, rsi
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.140049710
mov rbx, rax
test rax, rax
mov rax, qword [rsp + 0x40]
je 0x14004a040
test r14, r14
je 0x14004a266
test r15, r15
jg 0x14004a160
lea r8, [rsp + 0x50]
mov rdx, r14
mov rcx, rbp
call fcn.140049b60
mov r15, rax
lea r8, [rsp + 0x50]
mov rdx, rbx
mov rcx, rbp
call fcn.140049b60
mov rbp, rax
mov rsi, r12
cmp r15, rax
jge 0x14004a1f0
cmp qword [r14 + 8], r12
jbe 0x14004a19c
mov rdi, r12
mov rcx, qword [r14]
add rcx, rdi
call fcn.14004e6f0
inc rsi
add rdi, 0x20
cmp rsi, qword [r14 + 8]
jb 0x14004a184
mov rcx, qword [r14]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [r14 + 0x20]
test rdi, rdi
je 0x14004a1ca
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rsp + 0x40]
mov r15, rbp
mov rbp, qword [rsp + 0xa0]
mov r14, rbx
mov rsi, qword [rsp + 0x48]
jmp 0x14004a040
cmp qword [rbx + 8], r12
jbe 0x14004a218
mov rdi, r12
nop dword [rax]
mov rcx, qword [rbx]
add rcx, rdi
call fcn.14004e6f0
inc rsi
add rdi, 0x20
cmp rsi, qword [rbx + 8]
jb 0x14004a200
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [rbx + 0x20]
test rdi, rdi
je 0x14004a246
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rsp + 0x40]
mov rbp, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0x48]
jmp 0x14004a040
mov r14, rbx
mov r15, r12
jmp 0x14004a040
cmp ebx, 0x1b
ja 0x14004a285
cmp dword [rcx + rbx*4], 1
jne 0x14004a285
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], r12d
mov rdi, qword [rsp + 0xb0]
test rdi, rdi
je 0x14004a294
mov dword [rdi], ebx
mov rcx, r14
call fcn.14004add0
xor eax, eax
jmp 0x14004a2a3
mov rax, r14
mov r12, qword [rsp + 0x78]
mov rbx, qword [rsp + 0xb8]
mov r14, qword [rsp + 0x68]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret