Function at 0x140075590
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov r13, qword [0x140129dc0]
xor r9d, r9d
mov rbx, rdx
mov qword [rsp + 0x48], r13
mov r14, rcx
mov byte [rsp + 0x20], 1
xor edx, edx
mov rcx, r13
lea r8, [r9 - 1]
call fcn.1400d3350
mov rax, qword [0x140124200]
xor r12b, r12b
mov byte [rsp + 0xc8], r12b
mov rbp, 0xffffffffffffffff
mov qword [rsp + 0x78], rsi
mov r15d, dword [rax + 0x13c]
btr r15d, 0x1f
nop dword [rax]
mov rdi, rbx
movzx eax, word [rdi]
cmp ax, 0x20
je 0x140075612
cmp ax, 9
jne 0x140075618
add rdi, 2
jmp 0x140075603
cmp ax, 0x2a
jne 0x140075743
movzx esi, word [rdi + 2]
lea rbx, [rdi + 2]
test esi, 0xffffff80
jne 0x140075646
mov edx, 2
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
je 0x140075646
and esi, 0xffffffdf
cmp esi, 0x43
je 0x14007571a
cmp esi, 0x4d
je 0x1400756c7
cmp esi, 0x50
je 0x14007566a
cmp esi, 0x54
jne 0x140075722
mov r12b, 1
jmp 0x140075722
lea rcx, [rdi + 4]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
movzx edx, word [rbx]
mov r15d, eax
test dx, dx
je 0x1400756af
nop
lea rcx, [0x140106720]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140075714
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140075690
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x140075680
mov rax, qword [0x140124200]
mov dl, 1
mov rcx, r14
mov dword [rax + 0x40], 0x57
jmp 0x140075df2
lea rcx, [rdi + 4]
call fcn.140061d00
movzx r8d, word [rbx]
mov rbp, rax
test r8w, r8w
je 0x1400756af
nop dword [rax]
lea rdx, [0x140106720]
mov ecx, SafeArrayAllocDescriptor
nop dword [rax]
cmp r8w, cx
je 0x140075714
movzx ecx, word [rdx + 2]
add rdx, 2
test cx, cx
jne 0x1400756f0
movzx r8d, word [rbx + 2]
add rbx, 2
test r8w, r8w
jne 0x1400756e0
jmp 0x1400756af
add rbx, 0xfffffffffffffffe
jmp 0x140075722
mov byte [rsp + 0xc8], 1
cmp word [rbx], 0
je 0x140075600
add rbx, 2
cmp word [rbx], 0
je 0x140075600
add rbx, 2
jmp 0x140075600
xor edi, edi
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x8000000
mov rcx, rbx
mov dword [rsp + 0x20], 3
lea r8d, [rdi + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140075792
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140124200]
mov dl, 1
mov dword [rcx + 0x40], eax
mov rcx, r14
jmp 0x140075df2
xor eax, eax
lea rdx, [rsp + 0xd4]
mov rcx, rsi
mov qword [rsp + 0xd0], rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0xffffffff
mov dword [rsp + 0xd0], eax
cmp eax, ecx
jne 0x1400757cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400757da
mov ecx, 0xffffffff
mov rbx, qword [rsp + 0xd0]
cmp rbx, 0xffffffffffffffff
jne 0x1400757fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140124200]
mov dword [rcx + 0x40], eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dl, 1
mov rcx, r14
jmp 0x140075df2
cmp rbx, rbp
cmova rbx, rbp
cmp rbx, rcx
jbe 0x140075827
lea r9, [0x1400ef7e4]
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, r14
call fcn.14005fa50
jmp 0x140075df7
test rbx, rbx
jne 0x140075849
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140124200]
xor edx, edx
mov rcx, r14
mov dword [rax + 0x40], edi
jmp 0x140075df2
cmp byte [rsp + 0xc8], dil
je 0x140075962
movzx eax, byte [r13 + 0x23]
test al, al
jne 0x140075868
mov rax, qword [r13 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
je 0x140075962
mov rax, rbx
mov byte [rsp + 0x20], dil
and eax, 1
mov r8, rbx
shr r8, 1
mov bpl, 1
add r8, rax
movzx r9d, bpl
xor edx, edx
mov rcx, r13
call fcn.1400d3350
cmp eax, 1
jne 0x140075994
xor r8d, r8d
mov edx, eax
mov rcx, r13
call fcn.140001780
mov rdi, rax
test rax, rax
je 0x140075994
lea r9, [rsp + 0xd8]
mov qword [rsp + 0x20], 0
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r14d, eax
mov dword [rsp + 0xd0], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140124200]
mov dword [rcx + 0x40], eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14d, r14d
je 0x140075d55
movzx ebx, byte [rsp + 0xc8]
test bl, bl
jne 0x140075ca6
mov ecx, dword [rsp + 0xd8]
cmp ecx, 3
jb 0x1400759a4
cmp byte [rdi], 0xef
jne 0x1400759a4
cmp byte [rdi + 1], 0xbb
jne 0x1400759a4
cmp byte [rdi + 2], 0xbf
jne 0x1400759a4
lea r8d, [rcx - 3]
mov r9d, 0xfde9
mov rcx, r13
lea rdx, [rdi + 3]
call fcn.1400d4140
test eax, eax
jne 0x1400759e9
xor r14d, r14d
mov dword [rsp + 0xd0], r14d
jmp 0x1400759e9
lea rcx, [rbx + 2]
xor bpl, bpl
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400758b7
lea r9, [0x1400ef7e4]
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, r14
call fcn.14005fa50
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140075df7
cmp ecx, 2
jb 0x140075a1f
cmp byte [rdi], 0xff
jne 0x140075a1f
cmp byte [rdi + 1], 0xfe
jne 0x140075a1f
lea rdx, [rdi + 2]
add ecx, 0xfffffffe
mov r8d, ecx
mov r9b, 1
shr r8, 1
mov rcx, r13
mov byte [rsp + 0x20], 0
call fcn.1400d3350
test eax, eax
mov eax, 0
cmove r14d, eax
mov dword [rsp + 0xd0], r14d
test rdi, rdi
je 0x1400759f2
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r8d, r8d
mov rcx, r13
lea edx, [r8 + 1]
call fcn.140001780
mov qword [rsp + 0x58], rax
mov r15, rax
test r12b, r12b
je 0x140075da6
cmp byte [r13 + 0x23], 0
jne 0x140075a42
mov rbx, qword [r13 + 0x10]
jmp 0x140075a45
mov rdx, rdi
cmp r15d, 0x4b0
je 0x1400759bb
mov r8d, ecx
mov r9d, r15d
mov rcx, r13
call fcn.1400d4140
test eax, eax
jne 0x1400759e4
xor r14d, r14d
jmp 0x1400759dc
mov rbx, r13
cmp byte [rbx + 0x23], 1
lea r12, [0x14012d5d0]
jne 0x140075a66
test byte [rbx + 0x21], 8
je 0x140075a60
mov rcx, rbx
call fcn.140001620
lea rsi, [rbx + 0x10]
jmp 0x140075a69
mov rsi, r12
mov rsi, qword [rsi]
xor eax, eax
shr rsi, 1
mov ebp, 0xffffffff
mov r14d, eax
mov ebx, eax
mov qword [rsp + 0x50], rax
cmp word [r15], ax
je 0x140075c66
cmp rsi, 0x1388
jb 0x140075c01
mov edi, eax
nop dword [rax]
lea rdx, [0x14010f728]
mov rcx, r15
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov r13, rax
test rax, rax
je 0x140075b69
inc edi
mov eax, 0xffffffff
mov dword [rsp + 0x40], edi
add ebp, eax
mov rdi, r13
sub rdi, r15
sar rdi, 1
lea rax, [rdi + rbx]
lea rcx, [rax + 1]
mov qword [rsp + 0x60], rax
cmp rcx, qword [rsp + 0x50]
jb 0x140075b30
mov edx, dword [rsp + 0x40]
mov rax, r13
sub rax, qword [rsp + 0x58]
mov r8d, ebp
movsxd rcx, ecx
sar rax, 1
cdqe
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, 0xffffffffffffffff
movsxd r9, esi
call fcn.1400cf030
mov rcx, r14
mov qword [rsp + 0x50], rax
lea rdx, [rax + rax]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x140075ba5
mov r14, rax
test rdi, rdi
je 0x140075b4a
lea r8, [rdi + rdi]
mov rdx, r15
lea rcx, [r14 + rbx*2]
call sub.VCRUNTIME140.dll_memcpy
mov rbx, qword [rsp + 0x60]
movzx eax, word [reloc.WSOCK32.dll_inet_addr]
lea r15, [r13 + 4]
mov edi, dword [rsp + 0x40]
mov word [r14 + rbx*2], ax
inc rbx
test ebp, ebp
jne 0x140075aa0
test edi, edi
je 0x140075c61
mov rdi, qword [rsp + 0x58]
mov rax, r15
sub rax, rdi
sar rax, 1
sub rsi, rax
je 0x140075bd7
lea rbp, [rsi + rbx]
cmp rbp, qword [rsp + 0x50]
jb 0x140075bc4
lea rdx, [rbp*2 + 2]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
jne 0x140075bc1
test r14, r14
je 0x140075bb3
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r13, qword [rsp + 0x48]
xor eax, eax
mov ebx, eax
jmp 0x140075c69
mov r14, rax
lea r8, [rsi + rsi]
mov rdx, r15
lea rcx, [r14 + rbx*2]
call sub.VCRUNTIME140.dll_memcpy
mov rbx, rbp
xor eax, eax
lea r8, [rbx*2 + 2]
mov rdx, r14
mov word [r14 + rbx*2], ax
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r13, qword [rsp + 0x48]
jmp 0x140075c69
mov rdi, r15
mov r13, rbp
nop word [rax + rax]
lea rdx, [0x14010f728]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov rbx, rax
test rax, rax
je 0x140075c61
mov rcx, rax
lea rdi, [rax + 2]
sub rcx, r15
lea rdx, [rax + 4]
sar rcx, 1
mov r8, rsi
sub r8, rcx
mov rcx, rdi
lea r8, [r8*2 - 2]
call sub.VCRUNTIME140.dll_memmove
movzx eax, word [reloc.WSOCK32.dll_inet_addr]
dec rsi
mov word [rbx], ax
add ebp, r13d
jne 0x140075c10
mov r13, qword [rsp + 0x48]
mov rbx, rsi
cmp byte [r13 + 0x23], 0
jne 0x140075c76
mov rdi, qword [r13 + 0x10]
jmp 0x140075c79
mov rdi, r13
cmp byte [rdi + 0x23], 1
jne 0x140075c91
test byte [rdi + 0x21], 8
je 0x140075c8d
mov rcx, rdi
call fcn.140001620
lea r12, [rdi + 0x10]
mov r14d, dword [rsp + 0xd0]
lea rax, [rbx + rbx]
mov qword [r12], rax
jmp 0x140075d9e
movzx eax, byte [r13 + 0x23]
test al, al
jne 0x140075cb7
mov rax, qword [r13 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
jne 0x140075d01
mov edx, dword [rsp + 0xd8]
mov rcx, rdi
call fcn.1400d3130
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp ebx, 1
jne 0x140075dd2
mov rcx, qword [0x140127a38]
lea rdx, [0x1400ef8c4]
xor r9d, r9d
mov byte [rsp + 0x20], bl
lea r8, [r9 - 1]
call fcn.1400d3350
jmp 0x140075df7
mov ecx, dword [rsp + 0xd8]
test cl, 1
je 0x140075d13
mov byte [rcx + rdi], 0
inc ecx
xor eax, eax
mov esi, ecx
mov word [rcx + rdi], ax
cmp byte [r13 + 0x23], al
jne 0x140075d27
mov rbx, qword [r13 + 0x10]
jmp 0x140075d2a
mov rbx, r13
cmp byte [rbx + 0x23], 1
jne 0x140075d48
test byte [rbx + 0x21], 8
je 0x140075d3e
mov rcx, rbx
call fcn.140001620
lea r12, [rbx + 0x10]
mov qword [r12], rsi
jmp 0x140075d9e
lea r12, [0x14012d5d0]
mov qword [r12], rsi
jmp 0x140075d9e
xor eax, eax
mov word [rdi], ax
cmp byte [r13 + 0x23], al
jne 0x140075d66
mov rbx, qword [r13 + 0x10]
jmp 0x140075d69
mov rbx, r13
cmp byte [rbx + 0x23], 1
jne 0x140075d85
test byte [rbx + 0x21], 8
je 0x140075d7f
mov rcx, rbx
call fcn.140001620
xor eax, eax
lea r12, [rbx + 0x10]
jmp 0x140075d8c
lea r12, [0x14012d5d0]
mov qword [r12], rax
test bpl, bpl
jne 0x140075d9e
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
movzx ebx, byte [rsp + 0xc8]
cmp byte [r13 + 0x23], 0
jne 0x140075db1
mov r13, qword [r13 + 0x10]
cmp byte [r13 + 0x23], 2
jne 0x140075dd6
cmp qword [0x14012bc60], 0
je 0x140075dd6
lea rcx, [0x14012bc48]
call fcn.1400075e0
test eax, eax
jne 0x140075de4
xor eax, eax
jmp 0x140075df7
and byte [r13 + 0x21], 0x86
test bl, bl
je 0x140075de4
or byte [r13 + 0x21], 1
mov rcx, qword [rsp + 0xc0]
test r14d, r14d
sete dl
call fcn.14005f650
mov rsi, qword [rsp + 0x78]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret