Function at 0x14004ff80
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x8170
call fcn.1400ebe00
sub rsp, rax
mov qword [rsp + 0xe0], 0xfffffffffffffffe
mov qword [rsp + 0x81c0], rbx
mov rax, qword [0x140127190]
xor rax, rsp
mov qword [rsp + 0x8160], rax
mov rbx, rdx
mov r13, rcx
mov qword [rsp + 0xd8], rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x20], 8
jb 0x14004ffe1
mov rcx, qword [rbx + 8]
jmp 0x14004ffe5
lea rcx, [rbx + 8]
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r15 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14005002b
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x140050afc
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x44]
mov r8d, 0x8000
lea rdx, [rsp + 0x160]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140050109
movzx ebx, byte [rsp + 0x40]
nop
nop
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x140050109
mov rdi, qword [rsp + 0x70]
cmp qword [rsp + 0x68], rdi
jbe 0x140050091
call fcn.1400ca130
mov eax, dword [rsp + 0x44]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0xa8], rdi
shr rax, 1
lea r9, [rsp + rax*2 + 0x160]
movaps xmm0, xmmword [rsp + 0xa0]
movdqa xmmword [rsp + 0x80], xmm0
mov byte [rsp + 0x20], bl
lea r8, [rsp + 0x160]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x60]
call fcn.14004e460
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x44]
mov r8d, 0x8000
lea rdx, [rsp + 0x160]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140050070
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test eax, eax
jne 0x140050ad2
cmp dword [rsp + 0x44], eax
jne 0x140050ad2
mov word [rsp + 0x40], ax
mov rdx, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x14005016c
mov rcx, rdx
sub rcx, rbx
sar rcx, 1
mov rax, qword [rsp + 0x78]
sub rax, rbx
sar rax, 1
cmp rcx, rax
jae 0x14005016c
mov word [rdx], r14w
lea rax, [rdx + 2]
mov qword [rsp + 0x70], rax
jmp 0x14005021f
mov rdi, rdx
cmp rbx, rdx
jbe 0x140050183
call fcn.1400ca130
mov rdx, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rdi
test rbx, rbx
je 0x1400501ba
mov rax, rdx
sub rax, rbx
sar rax, 1
je 0x1400501ba
cmp rbx, rdx
jbe 0x1400501b2
call fcn.1400ca130
sub rdi, rbx
sar rdi, 1
jmp 0x1400501bd
mov rdi, r15
movaps xmm0, xmmword [rsp + 0x80]
movdqa xmmword [rsp + 0x80], xmm0
lea r9, [rsp + 0x40]
mov r8d, 1
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x60]
call fcn.14004eca0
mov r11, qword [rsp + 0x68]
mov rbx, r11
mov rax, qword [rsp + 0x70]
cmp r11, rax
jbe 0x14005020c
call fcn.1400ca130
mov rax, qword [rsp + 0x70]
mov r11, qword [rsp + 0x68]
lea rcx, [rbx + rdi*2]
cmp rcx, rax
ja 0x14005021a
cmp rcx, r11
jae 0x14005021f
call fcn.1400ca130
lea rcx, [rsp + 0x48]
call fcn.140022c50
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], r15
mov rax, qword [rsp + 0x70]
mov rdi, rax
mov rbx, qword [rsp + 0x68]
cmp rbx, rax
jbe 0x140050254
call fcn.1400ca130
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x80], rcx
mov qword [rsp + 0x88], rdi
cmp rbx, rax
jbe 0x140050278
call fcn.1400ca130
mov rax, qword [rsp + 0x70]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0xa0], rcx
cmp rbx, rax
jb 0x14005028f
call fcn.1400ca130
lea rax, [rbx + 2]
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r15
mov word [rsp + 0xf0], 0
movaps xmm0, xmmword [rsp + 0x80]
movdqa xmmword [rsp + 0x80], xmm0
movaps xmm1, xmmword [rsp + 0xa0]
movdqa xmmword [rsp + 0xa0], xmm1
movzx r9d, byte [rsp + 0x40]
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0xe8]
call fcn.14004d610
nop
lea r8, [0x1400f3ecc]
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0xe8]
call fcn.14004f6b0
cmp qword [rsp + 0x58], 0
je 0x140050a04
mov rax, qword [rsp + 0x50]
mov rbx, qword [rax]
cmp rbx, rax
jne 0x140050336
call fcn.1400ca130
lea rcx, [rbx + 0x10]
lea rdx, str.PDHOME_TRANSLATION_FILE
call fcn.14004d3b0
test al, al
je 0x140050374
mov rax, qword [rsp + 0x50]
mov rbx, qword [rax]
cmp rbx, rax
jne 0x14005035c
call fcn.1400ca130
lea rcx, [rbx + 0x10]
lea rdx, [0x1400f3e68]
call fcn.14004d3b0
test al, al
jne 0x140050a04
mov rcx, qword [rsp + 0x50]
mov rbx, qword [rcx]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x80], rax
cmp rbx, rcx
jne 0x140050398
call fcn.1400ca130
mov rcx, qword [rsp + 0x50]
mov rax, qword [rbx]
mov qword [rsp + 0x88], rax
movaps xmm0, xmmword [rsp + 0x80]
movdqa xmmword [rsp + 0x80], xmm0
mov r12, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x88]
mov rbx, rcx
test r12, r12
je 0x1400503d6
lea rax, [rsp + 0x48]
cmp r12, rax
je 0x1400503e0
call fcn.1400ca130
mov rcx, qword [rsp + 0x50]
cmp rsi, rbx
je 0x140050965
mov qword [rsp + 0x88], r15
mov qword [rsp + 0x90], r15
mov qword [rsp + 0x98], r15
test r12, r12
jne 0x14005040b
call fcn.1400ca130
cmp rsi, qword [r12 + 8]
jne 0x140050417
call fcn.1400ca130
lea rcx, [rsi + 0x10]
lea r8, [0x1400f3e64]
lea rdx, [rsp + 0x80]
call fcn.140027180
mov rdi, qword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
test r8, r8
je 0x14005082b
mov rcx, rdi
sub rcx, r8
movabs r9, 0x6666666666666667
mov rax, r9
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdx, 3
jne 0x14005082b
test rdx, rdx
jne 0x14005049a
call fcn.1400ca130
mov rdi, qword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
movabs r9, 0x6666666666666667
mov rbp, r8
test r8, r8
je 0x1400504c2
mov rcx, rdi
sub rcx, r8
mov rax, r9
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdx, 1
ja 0x1400504e1
call fcn.1400ca130
mov rdi, qword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
movabs r9, 0x6666666666666667
lea rbx, [r8 + 0x28]
test r8, r8
je 0x140050507
sub rdi, r8
mov rax, r9
imul rdi
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdx, 2
ja 0x140050514
call fcn.1400ca130
mov r8, qword [rsp + 0x88]
lea rdi, [r8 + 0x50]
mov rdx, rbp
lea rcx, [rsp + 0xb0]
call fcn.14004d810
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rbp
call fcn.1400a4180
nop
cmp qword [rsp + 0xd0], 8
jb 0x140050554
mov rcx, qword [rsp + 0xb8]
call fcn.1400c9d50
mov rdx, rbx
lea rcx, [rsp + 0xb0]
call fcn.14004d810
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.1400a4180
nop
cmp qword [rsp + 0xd0], 8
jb 0x140050590
mov rcx, qword [rsp + 0xb8]
call fcn.1400c9d50
lea rdx, str.__t_r_n
mov rcx, rbp
call fcn.14004d2a0
lea rdx, str.__t_r_n
mov rcx, rbx
call fcn.14004d2a0
lea rdx, str.__t_r_n
mov rcx, rdi
call fcn.14004d2a0
lea rdx, str.__t_r_n
mov rcx, rbp
call fcn.14004d180
lea rdx, str.__t_r_n
mov rcx, rbx
call fcn.14004d180
lea rdx, str.__t_r_n
mov rcx, rdi
call fcn.14004d180
mov r9, qword [rbp + 0x18]
add r9, 0xfffffffffffffffe
mov r8d, 1
lea rdx, [rsp + 0xb0]
mov rcx, rbp
call fcn.14004df50
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rbp
call fcn.1400a4180
nop
cmp qword [rsp + 0xd0], 8
jb 0x140050634
mov rcx, qword [rsp + 0xb8]
call fcn.1400c9d50
mov r9, qword [rbx + 0x18]
add r9, 0xfffffffffffffffe
mov r8d, 1
lea rdx, [rsp + 0xb0]
mov rcx, rbx
call fcn.14004df50
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.1400a4180
nop
cmp qword [rsp + 0xd0], 8
jb 0x14005067e
mov rcx, qword [rsp + 0xb8]
call fcn.1400c9d50
mov r9, qword [rdi + 0x18]
add r9, 0xfffffffffffffffe
mov r8d, 1
lea rdx, [rsp + 0xb0]
mov rcx, rdi
call fcn.14004df50
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rdi
call fcn.1400a4180
nop
cmp qword [rsp + 0xd0], 8
jb 0x1400506c8
mov rcx, qword [rsp + 0xb8]
call fcn.1400c9d50
mov qword [rsp + 0x130], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x128], r15
mov byte [rsp + 0x118], 0
mov qword [rsp + 0x158], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x150], r15
mov byte [rsp + 0x140], 0
xor r8d, r8d
lea rdx, [rsp + 0x110]
mov rcx, rbp
call fcn.14004e7e0
test eax, eax
jne 0x140050752
xor r8d, r8d
lea rdx, [rsp + 0x138]
mov rcx, rdi
call fcn.14004e7e0
test eax, eax
jne 0x140050752
lea rcx, [r13 + 0x28]
lea rdx, [rsp + 0x110]
call fcn.14004fc90
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
mov rcx, rax
call fcn.1400a4180
nop
cmp qword [rsp + 0x158], 0x10
jb 0x14005076a
mov rcx, qword [rsp + 0x140]
call fcn.1400c9d50
mov qword [rsp + 0x158], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x150], r15
mov byte [rsp + 0x140], 0
cmp qword [rsp + 0x130], 0x10
jb 0x14005079e
mov rcx, qword [rsp + 0x118]
call fcn.1400c9d50
mov qword [rsp + 0x130], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x128], r15
mov byte [rsp + 0x118], 0
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x140050812
mov rdi, qword [rsp + 0x90]
cmp rcx, rdi
je 0x14005080d
lea rbx, [rcx + 0x20]
cmp qword [rbx], 8
jb 0x1400507e7
mov rcx, qword [rbx - 0x18]
call fcn.1400c9d50
mov qword [rbx], 7
mov qword [rbx - 8], r15
mov word [rbx - 0x18], 0
add rbx, 0x28
lea rax, [rbx - 0x20]
cmp rax, rdi
jne 0x1400507d8
mov rcx, qword [rsp + 0x88]
call fcn.1400c9d50
cmp rsi, qword [r12 + 8]
jne 0x14005081e
call fcn.1400ca130
mov rsi, qword [rsi]
mov rcx, qword [rsp + 0x50]
jmp 0x1400503c4
test r8, r8
je 0x14005087d
cmp r8, rdi
je 0x140050875
lea rbx, [r8 + 0x20]
nop
nop
cmp qword [rbx], 8
jb 0x14005084f
mov rcx, qword [rbx - 0x18]
call fcn.1400c9d50
mov qword [rbx], 7
mov qword [rbx - 8], r15
mov word [rbx - 0x18], 0
add rbx, 0x28
lea rax, [rbx - 0x20]
cmp rax, rdi
jne 0x140050840
mov r8, qword [rsp + 0x88]
mov rcx, r8
call fcn.1400c9d50
mov qword [rsp + 0x88], r15
mov qword [rsp + 0x90], r15
mov qword [rsp + 0x98], r15
cmp qword [rsp + 0x108], 8
jb 0x1400508ad
mov rcx, qword [rsp + 0xf0]
call fcn.1400c9d50
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r15
mov word [rsp + 0xf0], 0
mov rax, qword [rsp + 0x50]
mov rbx, qword [rax]
mov qword [rax], rax
mov rax, qword [rsp + 0x50]
mov qword [rax + 8], rax
mov qword [rsp + 0x58], r15
mov rcx, qword [rsp + 0x50]
cmp rbx, rcx
je 0x14005092a
nop
mov rdi, qword [rbx]
cmp qword [rbx + 0x30], 8
jb 0x140050903
mov rcx, qword [rbx + 0x18]
call fcn.1400c9d50
mov qword [rbx + 0x30], 7
mov qword [rbx + 0x28], r15
mov word [rbx + 0x18], 0
mov rcx, rbx
call fcn.1400c9d50
mov rbx, rdi
mov rcx, qword [rsp + 0x50]
cmp rdi, rcx
jne 0x1400508f0
call fcn.1400c9d50
mov qword [rsp + 0x50], r15
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140050943
call fcn.1400c9d50
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x140050afc
cmp qword [rsp + 0x108], 8
jb 0x140050982
mov rcx, qword [rsp + 0xf0]
call fcn.1400c9d50
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r15
mov word [rsp + 0xf0], 0
mov rbx, qword [rcx]
mov qword [rcx], rcx
mov rax, qword [rsp + 0x50]
mov qword [rax + 8], rax
mov qword [rsp + 0x58], r15
mov rcx, qword [rsp + 0x50]
cmp rbx, rcx
je 0x1400509fa
nop
mov rdi, qword [rbx]
cmp qword [rbx + 0x30], 8
jb 0x1400509d3
mov rcx, qword [rbx + 0x18]
call fcn.1400c9d50
mov qword [rbx + 0x30], 7
mov qword [rbx + 0x28], r15
mov word [rbx + 0x18], 0
mov rcx, rbx
call fcn.1400c9d50
mov rbx, rdi
mov rcx, qword [rsp + 0x50]
cmp rdi, rcx
jne 0x1400509c0
call fcn.1400c9d50
jmp 0x140050ad2
cmp qword [rsp + 0x108], 8
jb 0x140050a1c
mov rcx, qword [rsp + 0xf0]
call fcn.1400c9d50
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r15
mov word [rsp + 0xf0], 0
mov rax, qword [rsp + 0x50]
mov rbx, qword [rax]
mov qword [rax], rax
mov rax, qword [rsp + 0x50]
mov qword [rax + 8], rax
mov qword [rsp + 0x58], r15
mov rcx, qword [rsp + 0x50]
cmp rbx, rcx
je 0x140050a9a
nop
mov rdi, qword [rbx]
cmp qword [rbx + 0x30], 8
jb 0x140050a73
mov rcx, qword [rbx + 0x18]
call fcn.1400c9d50
mov qword [rbx + 0x30], 7
mov qword [rbx + 0x28], r15
mov word [rbx + 0x18], 0
mov rcx, rbx
call fcn.1400c9d50
mov rbx, rdi
mov rcx, qword [rsp + 0x50]
cmp rdi, rcx
jne 0x140050a60
call fcn.1400c9d50
mov qword [rsp + 0x50], r15
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140050ab3
call fcn.1400c9d50
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x140050afc
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140050ae1
call fcn.1400c9d50
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, r14d
mov rcx, qword [rsp + 0x8160]
xor rcx, rsp
call fcn.1400caf00
mov rbx, qword [rsp + 0x81c0]
add rsp, 0x8170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret