Function at 0x140002c80
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x140019030]
xor rax, rsp
mov qword [rbp - 8], rax
xor ebx, ebx
mov rdi, rcx
mov word [rdx], bx
mov rsi, rdx
mov rcx, qword [rcx]
mov byte [rbp - 0x1f], bl
cmp rcx, 0xffffffffffffffff
je 0x140002ffa
lea r9, [rbp - 0x14]
mov dword [rbp - 0x14], ebx
lea r8d, [rbx + 1]
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x1f]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x14], ebx
jle 0x140002ffa
movzx eax, byte [rbp - 0x1f]
cmp al, 0x7f
jbe 0x140002d87
mov word [rbp - 0x18], bx
movzx edx, al
xor ecx, ecx
mov byte [rbp - 0x18], al
mov word [rbp - 0x14], bx
call qword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
mov r14d, eax
test eax, eax
je 0x140002d44
mov rcx, qword [rdi]
mov byte [rbp - 0x20], bl
cmp rcx, 0xffffffffffffffff
je 0x140002ffa
lea r9, [rbp - 0x1c]
mov dword [rbp - 0x1c], ebx
lea r8d, [rbx + 1]
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x1c], ebx
jle 0x140002ffa
movzx eax, byte [rbp - 0x20]
mov byte [rbp - 0x17], al
lea rax, [rbp - 0x14]
mov dword [rsp + 0x28], 1
test r14d, r14d
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x18]
mov edx, 8
setne bl
xor ecx, ecx
lea r9d, [rbx + 1]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, 1
mov ecx, 0x3f
mov al, 1
cmove cx, word [rbp - 0x14]
mov word [rsi], cx
jmp 0x140002ffc
cmp al, 0xd
jne 0x140002e0f
mov eax, 0xd
mov word [rsi], ax
cmp byte [rdi + 0x15], bl
je 0x140002fc7
mov rcx, qword [rdi]
mov byte [rbp - 0x20], bl
cmp rcx, 0xffffffffffffffff
je 0x140002fc7
lea r9, [rbp - 0x1c]
mov dword [rbp - 0x1c], ebx
lea r8d, [rax - 0xc]
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x1c], ebx
jle 0x140002fc7
cmp byte [rbp - 0x20], 0xa
je 0x140002e00
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x140002fc7
mov r9d, 1
xor r8d, r8d
lea edx, [r9 - 2]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov al, 1
jmp 0x140002ffc
mov eax, 0xa
mov word [rsi], ax
mov al, 1
jmp 0x140002ffc
cmp al, 0x5c
jne 0x140002e05
cmp byte [rdi + 0x14], bl
je 0x140002e05
mov rcx, qword [rdi]
mov qword [rbp - 0x10], rbx
mov byte [rbp - 0x10], al
cmp rcx, 0xffffffffffffffff
jne 0x140002e2d
mov r10d, ecx
jmp 0x140002e57
lea r9, [rbp - 0x1c]
mov dword [rbp - 0x1c], ebx
mov r8d, 6
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0xf]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rbp - 0x10], 0x5c
mov r10d, dword [rbp - 0x1c]
jne 0x140002fcb
movzx r11d, byte [rbp - 0xf]
lea eax, [r11 - 0x55]
test al, 0xdf
jne 0x140002fcb
cmp byte [rbp - 0xe], 0x2b
jne 0x140002fcb
movsx ecx, byte [rbp - 0xd]
lea eax, [rcx - 0x30]
cmp al, 9
jbe 0x140002e8f
lea eax, [rcx - 0x41]
cmp al, 5
jbe 0x140002e8f
lea eax, [rcx - 0x61]
cmp al, 5
ja 0x140002fcb
movsx edx, byte [rbp - 0xc]
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x140002eac
lea eax, [rdx - 0x41]
cmp al, 5
jbe 0x140002eac
lea eax, [rdx - 0x61]
cmp al, 5
ja 0x140002fcb
movsx r9d, byte [rbp - 0xb]
lea eax, [r9 - 0x30]
cmp al, 9
jbe 0x140002ecd
lea eax, [r9 - 0x41]
cmp al, 5
jbe 0x140002ecd
lea eax, [r9 - 0x61]
cmp al, 5
ja 0x140002fcb
movsx r8d, byte [rbp - 0xa]
lea eax, [r8 - 0x30]
cmp al, 9
jbe 0x140002eee
lea eax, [r8 - 0x41]
cmp al, 5
jbe 0x140002eee
lea eax, [r8 - 0x61]
cmp al, 5
ja 0x140002fcb
sub r11b, 0x55
test r11b, 0xdf
jne 0x140002fc7
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x140002f07
mov eax, ecx
jmp 0x140002f21
lea eax, [rcx - 0x41]
cmp al, 5
ja 0x140002f13
lea eax, [rcx - 0x37]
jmp 0x140002f21
lea eax, [rcx - 0x61]
cmp al, 5
ja 0x140002fc7
lea eax, [rcx - 0x57]
shl ax, 0xc
movzx ecx, ax
mov word [rsi], ax
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x140002f37
sub edx, 0x30
jmp 0x140002f4d
lea eax, [rdx - 0x41]
cmp al, 5
ja 0x140002f43
sub edx, 0x37
jmp 0x140002f4d
lea eax, [rdx - 0x61]
cmp al, 5
ja 0x140002fc7
sub edx, 0x57
shl dx, 8
lea eax, [r9 - 0x30]
or dx, cx
mov word [rsi], dx
cmp al, 9
ja 0x140002f65
lea ecx, [r9 - 0x30]
jmp 0x140002f7f
lea eax, [r9 - 0x41]
cmp al, 5
ja 0x140002f73
lea ecx, [r9 - 0x37]
jmp 0x140002f7f
lea eax, [r9 - 0x61]
cmp al, 5
ja 0x140002fc7
lea ecx, [r9 - 0x57]
shl cx, 4
lea eax, [r8 - 0x30]
or cx, dx
mov word [rsi], cx
cmp al, 9
ja 0x140002f9f
lea eax, [r8 - 0x30]
or ax, cx
mov word [rsi], ax
mov al, 1
jmp 0x140002ffc
lea eax, [r8 - 0x41]
cmp al, 5
ja 0x140002fb5
lea eax, [r8 - 0x37]
or ax, cx
mov word [rsi], ax
mov al, 1
jmp 0x140002ffc
lea eax, [r8 - 0x61]
cmp al, 5
ja 0x140002fc7
lea eax, [r8 - 0x57]
or ax, cx
mov word [rsi], ax
mov al, 1
jmp 0x140002ffc
test r10d, r10d
jle 0x140002fee
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x140002fee
neg r10d
mov r9d, 1
mov edx, r10d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, 0x5c
mov word [rsi], ax
mov al, 1
jmp 0x140002ffc
xor al, al
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14000dba0
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret