Function at 0x140047f70
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x2a8]
sub rsp, 0x390
mov qword [rbp + 0x80], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rsi, rdx
mov r14, rcx
test r8b, r8b
je 0x140047fbe
cmp qword [rdx + 0x18], 8
jb 0x140047fb2
mov rdx, qword [rdx]
lea rcx, str.FileToStruct__ls
call fcn.14003c5f0
xor edx, edx
mov rcx, rsi
call fcn.14003a930
test al, al
je 0x1400482b4
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140047fdd
mov rdx, qword [rsi]
lea r8, [0x14009de44]
lea rcx, [rbp + 0x2c8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov r9, qword [rbp + 0x2c8]
mov qword [rsp + 0x20], r9
lea rax, [rbp + 0x90]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], pe_nt_image_headers64
xor r15d, r15d
mov qword [rsp + 0x38], r15
lea rax, [rbp + 0x90]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], r15
mov byte [rsp + 0x58], r15b
mov qword [rsp + 0x50], r15
lea edx, [r15 + 1]
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x90]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x28]
lea r8, [rax + rdx]
lea rcx, [r8 - 1]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x40], rdx
cmp rax, qword [rsp + 0x30]
jae 0x140048081
mov byte [r8], r15b
inc qword [rsp + 0x38]
mov byte [rsp + 0x58], 1
mov rdx, qword [rsp + 0x40]
lea rax, [rsp + 0x20]
mov qword [rsp + 0x68], rax
movzx edi, byte [rdx]
lea rcx, [rsp + 0x20]
call fcn.1400603a0
mov rax, qword [rsp + 0x40]
movzx ebx, byte [rax]
lea rcx, [rsp + 0x20]
call fcn.1400603a0
movzx ecx, bx
shl cx, 8
or cx, di
mov eax, 0xfeff
cmp cx, ax
jne 0x1400480ec
mov rax, qword [rsp + 0x40]
movzx edi, byte [rax]
lea rcx, [rsp + 0x20]
call fcn.1400603a0
mov rax, qword [rsp + 0x40]
movzx ebx, byte [rax]
lea rcx, [rsp + 0x20]
call fcn.1400603a0
movzx ecx, bx
shl cx, 8
or cx, di
mov word [rsp + 0x70], cx
xor eax, eax
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x28], rax
mov word [rbp + 0x2e], r15w
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x30], xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp + 0x40], xmm1
movdqa xmmword [rbp + 0x50], xmm0
movdqa xmm1, xmmword [0x1400a1b70]
movdqa xmmword [rbp + 0x60], xmm1
mov dword [rbp + 0x70], r15d
mov qword [rbp + 0x78], r15
lea ecx, [rax + 0x28]
call fcn.14003c848
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140048155
mov qword [rax], r15
mov qword [rax + 8], 0x10000
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
jmp 0x140048158
mov rax, r15
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x38], rax
lea rdx, [rsp + 0x68]
lea rcx, [rbp + 0x20]
call fcn.140040810
cmp dword [rbp + 0x70], 0
je 0x1400482fb
mov rcx, qword [rbp + 0x2c8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fclose_nolock]
nop
lea rcx, [rbp + 0x20]
call fcn.140046c80
cmp qword [rsi + 0x18], 8
jb 0x140048199
mov rsi, qword [rsi]
lea r8, [0x14009de44]
mov rdx, rsi
lea rcx, [rbp + 0x2c8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov r9, qword [rbp + 0x2c8]
mov qword [rbp - 0x80], r9
lea rax, [rbp + 0x190]
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], pe_nt_image_headers64
mov qword [rbp - 0x58], r15
mov byte [rbp - 0x48], 0
mov qword [rbp - 0x50], r15
mov edx, 1
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x190]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov qword [rbp - 0x58], rax
mov rdx, qword [rbp - 0x78]
lea rcx, [rdx - 1]
add rcx, rax
mov qword [rbp - 0x68], rcx
mov qword [rbp - 0x60], rdx
cmp rax, qword [rbp - 0x70]
jae 0x14004821b
mov byte [rax + rdx], 0
inc qword [rbp - 0x68]
mov byte [rbp - 0x48], 1
xor eax, eax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
mov word [rbp - 0x32], r15w
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x30], xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp - 0x20], xmm1
movdqa xmmword [rbp - 0x10], xmm0
movdqa xmm1, xmmword [0x1400a1b70]
movdqa xmmword [rbp], xmm1
mov dword [rbp + 0x10], r15d
mov qword [rbp + 0x18], r15
lea ecx, [rax + 0x28]
call fcn.14003c848
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14004827f
mov qword [rax], r15
mov qword [rax + 8], 0x10000
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
jmp 0x140048282
mov rax, r15
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x40]
call fcn.140040960
cmp dword [rbp + 0x10], 0
je 0x1400482d3
mov rcx, qword [rbp + 0x2c8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fclose_nolock]
nop
lea rcx, [rbp - 0x40]
call fcn.140046c80
xor al, al
lea r11, [rsp + 0x390]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov rax, qword [r14]
lea rdx, [rbp - 0x40]
mov rcx, r14
call qword [rax + reloc.WS2_32.dll_recv]
mov rcx, qword [rbp + 0x2c8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fclose_nolock]
nop
lea rcx, [rbp - 0x40]
call fcn.140046c80
mov al, 1
jmp 0x1400482b6
mov rax, qword [r14]
lea rdx, [rbp + 0x20]
mov rcx, r14
call qword [rax + reloc.WS2_32.dll_recv]
mov rcx, qword [rbp + 0x2c8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fclose_nolock]
nop
lea rcx, [rbp + 0x20]
call fcn.140046c80
mov al, 1
jmp 0x1400482b6