Function at 0x4763f0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
test rdx, rdx
mov r12, rdx
mov rbx, rcx
sete al
test r8, r8
mov rbp, r8
sete dl
or eax, edx
test rcx, rcx
sete r13b
or r13b, al
je 0x476440
xor esi, esi
mov eax, esi
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rcx], 0xffffffff
mov qword [rcx + 8], 0
mov qword [rcx + 0x10], 0
mov qword [rcx + 0x18], 0
mov qword [rcx + 0x20], 0
mov dword [rcx + 0x28], 0
mov qword [rcx + 0x38], 0
mov qword [rcx + 0x30], 0
movzx eax, byte [r8]
cmp al, 0x61
je 0x476624
cmp al, 0x72
je 0x4765c0
cmp al, 0x77
jne 0x476426
lea rdi, [0x00549826]
mov ecx, 2
mov rsi, r8
repe cmpsb byte [rsi], byte [rdi]
seta al
setb dl
sub eax, edx
movsx eax, al
cmp eax, 1
sbb edi, edi
and edi, 0x8000
add edi, 0x301
mov rcx, r12
mov qword [rsp + 0x78], 0
call fcn.0041c2b0
test al, al
mov esi, eax
je 0x476846
xor r14d, r14d
xor esi, esi
mov r8d, 0x180
mov edx, edi
mov rcx, r12
call sub.msvcrt.dll__open
mov dword [rbx], eax
cmp eax, 0xffffffff
je 0x476426
test r13b, r13b
jne 0x476660
test sil, sil
jne 0x476770
test r14b, r14b
je 0x4767a0
cmp byte [0x0055d100], 0
je 0x476750
mov edx, 0x860
mov ecx, 1
call fcn.0040e940
test rax, rax
mov r15, rax
je 0x476428
mov rcx, rax
call fcn.0050f5e0
lea rax, [0x00549870]
mov dword [r15 + 0x18], 7
mov edx, 0x40000
mov rcx, r15
mov qword [r15 + 0x10], rax
call qword [r15]
test rax, rax
mov qword [r15 + 0x30], rax
je 0x4765a5
lea r13, [r15 + 0x58]
lea rdi, [r15 + 0x68]
mov rcx, r13
call fcn.0050eea0
mov rcx, rdi
call fcn.0050e9a0
mov rdx, r12
mov rcx, rdi
call fcn.0050e9b0
test eax, eax
je 0x4768c7
mov rdx, qword [r15 + 0x30]
mov rcx, r15
call qword [r15 + 8]
mov rcx, r15
call fcn.0040ea80
mov ecx, dword [rbx]
call sub.msvcrt.dll__close
jmp 0x476428
lea rdi, [0x00549823]
mov ecx, 2
mov rsi, r8
repe cmpsb byte [rsi], byte [rdi]
mov rcx, r12
mov qword [rsp + 0x78], 0
sete dil
movzx edi, dil
call fcn.0041c2b0
shl edi, 0xf
test al, al
mov r13d, eax
jne 0x4768ba
xor edx, edx
mov rcx, r12
call sub.msvcrt.dll__open
cmp eax, 0xffffffff
mov r15d, eax
jne 0x4766a0
xor r14d, r14d
xor esi, esi
mov edx, edi
mov rcx, r12
call sub.msvcrt.dll__open
mov dword [rbx], eax
jmp 0x4764f4
lea rdi, [0x00549820]
mov ecx, 2
mov rsi, r8
repe cmpsb byte [rsi], byte [rdi]
seta al
setb dl
sub eax, edx
movsx eax, al
cmp eax, 1
sbb edi, edi
and edi, 0x8000
add edi, 0x109
jmp 0x4764c2
mov rdx, rbp
mov ecx, eax
call fcn.00518c50
test rax, rax
mov qword [rbx + 0x10], rax
je 0x476426
mov edx, 0x40000
mov rcx, rax
call fcn.005185e0
mov qword [rbx + 0x38], r12
mov qword [rbx + 0x30], rbp
mov esi, 1
jmp 0x476428
lea r14, [rsp + 0x78]
xor r8d, r8d
xor edx, edx
mov ecx, eax
call fcn.0052b4a0
mov r8d, 8
mov rdx, r14
mov ecx, r15d
call sub.msvcrt.dll__read
test eax, eax
mov r8d, 0xffffffff
jle 0x4767e4
mov rdx, qword [0x0054f860]
movzx eax, byte [rsp + 0x78]
mov ecx, dword [rdx]
cmp dword [rsp + 0x78], ecx
je 0x476830
mov edx, 1
cmp al, 0x1f
je 0x476801
cmp al, 0x50
jne 0x476704
cmp byte [rsp + 0x79], 0x4b
je 0x476891
test edx, edx
je 0x4767f1
mov rcx, r14
mov dword [rsp + 0x40], r8d
xor r14d, r14d
call fcn.0041c450
mov r8d, dword [rsp + 0x40]
mov dword [rbx + 0x28], eax
xor esi, esi
xor r13d, r13d
mov ecx, r15d
mov dword [rsp + 0x40], r8d
call sub.msvcrt.dll__close
mov r8d, dword [rsp + 0x40]
cmp r8d, 0xffffffff
je 0x476613
jmp 0x4764e8
call fcn.0050e750
call fcn.00513b80
call fcn.00513970
mov byte [0x0055d100], 1
jmp 0x476525
mov rcx, r12
call fcn.0051a540
test rax, rax
mov qword [rbx + 0x18], rax
je 0x476426
mov rcx, rax
call fcn.0051b5b0
test eax, eax
je 0x476684
jmp 0x476426
mov rdx, rbp
mov ecx, eax
call sub.msvcrt.dll__fdopen
test rax, rax
mov qword [rbx + 8], rax
je 0x476426
movsxd r8, dword [rbx + 0x28]
test r8d, r8d
je 0x476684
lea rcx, [rsp + 0x78]
mov r9, rax
mov edx, 1
call sub.msvcrt.dll_fread
cmp dword [rbx + 0x28], eax
jne 0x476426
jmp 0x476684
mov ecx, r15d
call sub.msvcrt.dll__close
jmp 0x47660e
xor esi, esi
xor r13d, r13d
mov r14d, 1
jmp 0x476729
cmp byte [rsp + 0x79], 0x8b
jne 0x476704
movzx eax, byte [rsp + 0x7a]
cmp al, 8
sete r13b
test edx, edx
jne 0x476977
xor esi, esi
mov r14d, 1
jmp 0x476729
movzx ecx, word [rdx + 4]
xor edx, edx
cmp word [rsp + 0x7c], cx
jne 0x4766e8
jmp 0x4766ed
xor edx, edx
mov rcx, r12
call sub.msvcrt.dll__open
cmp eax, 0xffffffff
mov r15d, eax
je 0x476a6c
lea r14, [rsp + 0x78]
xor r8d, r8d
xor edx, edx
mov ecx, eax
call fcn.0052b4a0
mov r8d, 8
mov rdx, r14
mov ecx, r15d
call sub.msvcrt.dll__read
test eax, eax
jle 0x476a64
mov r8d, 0x180
jmp 0x4766d0
cmp byte [rsp + 0x7a], 3
jne 0x476704
cmp byte [rsp + 0x7b], 4
jne 0x476704
test edx, edx
mov esi, 1
sete r14b
xor r13d, r13d
jmp 0x476729
xor r14d, r14d
xor esi, esi
xor r13d, r13d
jmp 0x476613
lea rax, [rsp + 0x80]
xor edx, edx
lea r14, [r15 + 0x848]
mov rcx, rax
mov qword [rsp + 0x48], rax
call fcn.0050f2f0
mov rdx, qword [r15 + 0x30]
mov rcx, r14
mov qword [rsp + 0xc0], 0x40000
mov qword [rsp + 0xa0], r13
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb8], rdx
call fcn.00516bd0
lea rax, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x20], r15
mov rcx, r14
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x40], rax
mov r8, rax
mov rax, qword [rsp + 0x48]
mov rdx, rax
call fcn.00516d20
test eax, eax
jne 0x47695f
cmp qword [rsp + 0x60], 0
je 0x47698f
mov rcx, r14
mov rdx, r15
call fcn.00516bf0
mov rcx, rdi
call fcn.0050eb30
jmp 0x47659a
cmp al, 8
jne 0x47670c
xor r14d, r14d
xor esi, esi
mov r13d, 1
jmp 0x476729
mov rcx, r14
call fcn.00516c50
mov rcx, r14
mov qword [r15 + 0x28], rax
call fcn.00516c90
xor r8d, r8d
mov qword [r15 + 0x80], rax
mov qword [rsp + 0x68], 0x40000
mov rdx, qword [rsp + 0x40]
mov rcx, r13
call qword [r15 + 0x60]
test eax, eax
jne 0x47695f
lea rax, [rsp + 0x68]
mov rdx, qword [r15 + 0x30]
mov rcx, r13
mov qword [rsp + 0x40], rax
mov r8, rax
call qword [r15 + 0x58]
test eax, eax
jne 0x47695f
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x47695f
lea r13, [r15 + 0x88]
mov qword [r15 + 0x40], rax
mov rdx, r15
mov qword [rsp + 0x70], 0
mov rcx, r13
call fcn.00514550
lea rax, [rsp + 0x5c]
mov r9, qword [r15 + 0x30]
lea r8, [rsp + 0x70]
xor edx, edx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x40]
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.00514670
test eax, eax
jne 0x476a7d
mov rax, qword [rsp + 0x68]
mov qword [r15 + 0x48], rax
mov qword [r15 + 0x50], rax
mov qword [rbx + 0x20], r15
jmp 0x476684
mov ecx, r15d
call sub.msvcrt.dll__close
xor r14d, r14d
xor r13d, r13d
mov r8d, 0x180
jmp 0x4764e8
mov rcx, r13
call fcn.00514610
jmp 0x47695f