Function at 0x14005d230
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov r12d, 0xfffffffe
movsxd rax, ecx
mov ebx, r8d
cmp eax, r12d
mov dword [rsp + 0x34], r12d
mov dword [rsp + 0x38], ebx
jne 0x14005d27c
call fcn.14004e360
xor edi, edi
mov dword [rax], edi
call fcn.14004e340
mov dword [rax], 9
jmp 0x14005d949
xor edi, edi
cmp eax, edi
jl 0x14005d923
cmp eax, dword [0x14008e4b0]
jae 0x14005d923
mov sil, al
mov r14, rax
lea r8, [0x140000000]
sar r14, 5
and esi, 0x1f
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
imul rsi, rsi, 0x38
mov al, byte [rcx + rsi + 8]
test al, 1
je 0x14005d923
cmp ebx, edi
mov ebp, edi
je 0x14005d91f
test al, 2
jne 0x14005d91f
cmp rdx, rdi
jne 0x14005d2ec
call fcn.14004e360
mov dword [rax], edi
call fcn.14004e340
mov dword [rax], reloc.Cabinet.dll_FDICopy
jmp 0x14005d935
mov r15d, dword [rcx + rsi + 0xc]
mov ecx, 4
and r15d, 3
mov eax, r15d
sub eax, 1
je 0x14005d317
cmp eax, 1
jne 0x14005d312
mov eax, ebx
not eax
test al, 1
je 0x14005d2d5
and ebx, 0xfffffffe
mov r13, rdx
jmp 0x14005d357
mov eax, ebx
not eax
test al, 1
je 0x14005d2d5
shr ebx, 1
cmp ebx, ecx
cmovb ebx, ecx
mov ecx, ebx
call fcn.14004c8b0
cmp rax, rdi
mov r13, rax
jne 0x14005d350
call fcn.14004e340
mov dword [rax], 0xc
call fcn.14004e360
mov dword [rax], 8
jmp 0x14005d949
lea r8, [0x140000000]
mov rax, qword [r8 + r14*8 + 0x8e4c0]
mov rdx, r13
test byte [rax + rsi + 8], 0x48
je 0x14005d40c
mov cl, byte [rax + rsi + 9]
cmp cl, 0xa
je 0x14005d40c
cmp ebx, edi
je 0x14005d40c
mov byte [r13], cl
mov rax, qword [r8 + r14*8 + 0x8e4c0]
or r9d, 0xffffffff
add ebx, r9d
cmp r15d, edi
lea rdx, [r13 + 1]
mov byte [rax + rsi + 9], 0xa
mov ebp, 1
je 0x14005d40c
mov rax, qword [r8 + r14*8 + 0x8e4c0]
mov cl, byte [rax + rsi + 0xa]
cmp cl, 0xa
je 0x14005d40c
cmp ebx, edi
je 0x14005d40c
mov byte [rdx], cl
mov rax, qword [r8 + r14*8 + 0x8e4c0]
add rdx, rbp
add ebx, r9d
cmp r15d, 1
mov ebp, 2
mov byte [rax + rsi + 0xa], 0xa
jne 0x14005d40c
mov rax, qword [r8 + r14*8 + 0x8e4c0]
mov cl, byte [rax + rsi + 0xb]
cmp cl, 0xa
je 0x14005d40c
cmp ebx, edi
je 0x14005d40c
mov byte [rdx], cl
mov rax, qword [r8 + r14*8 + 0x8e4c0]
add rdx, 1
lea ebp, [r15 + 2]
add ebx, r9d
mov byte [rax + rsi + 0xb], 0xa
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
lea r9, [rsp + 0x30]
mov r8d, ebx
mov rcx, qword [rcx + rsi]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
je 0x14005d8e3
movsxd rdx, dword [rsp + 0x30]
cmp edx, edi
jl 0x14005d8e3
mov eax, ebx
cmp rdx, rax
ja 0x14005d8e3
lea r8, [0x140000000]
add ebp, edx
mov rax, qword [r8 + r14*8 + 0x8e4c0]
test byte [rax + rsi + 8], 0x80
je 0x14005d8c1
cmp r15d, 2
je 0x14005d719
cmp edx, edi
je 0x14005d483
cmp byte [r13], 0xa
jne 0x14005d483
or byte [rax + rsi + 8], 4
jmp 0x14005d488
and byte [rax + rsi + 8], 0xfb
movsxd rax, ebp
mov rbx, r13
mov r12, r13
lea rbp, [rax + r13]
cmp r13, rbp
jae 0x14005d5d1
mov al, byte [r12]
cmp al, 0x1a
je 0x14005d5b1
cmp al, 0xd
je 0x14005d4bd
mov byte [rbx], al
add rbx, 1
add r12, 1
jmp 0x14005d5a6
lea rax, [rbp - 1]
cmp r12, rax
jae 0x14005d4e1
lea rax, [r12 + 1]
cmp byte [rax], 0xa
jne 0x14005d4d9
add r12, 2
jmp 0x14005d56a
mov r12, rax
jmp 0x14005d59f
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rcx + rsi]
mov r8d, 1
add r12, 1
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x14005d51d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jne 0x14005d598
cmp dword [rsp + 0x30], edi
je 0x14005d598
lea r8, [0x140000000]
mov rax, qword [r8 + r14*8 + 0x8e4c0]
test byte [rax + rsi + 8], 0x48
je 0x14005d55b
cmp byte [rsp + 0xa0], 0xa
je 0x14005d56a
mov byte [rbx], 0xd
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
mov al, byte [rsp + 0xa0]
mov byte [rcx + rsi + 9], al
jmp 0x14005d5a2
cmp rbx, r13
jne 0x14005d56f
cmp byte [rsp + 0xa0], 0xa
jne 0x14005d56f
mov byte [rbx], 0xa
jmp 0x14005d5a2
mov ecx, dword [rsp + 0x90]
mov r8d, 1
or rdx, 0xffffffffffffffff
call fcn.140059708
cmp byte [rsp + 0xa0], 0xa
lea r8, [0x140000000]
je 0x14005d5a6
jmp 0x14005d59f
lea r8, [0x140000000]
mov byte [rbx], 0xd
add rbx, 1
cmp r12, rbp
jb 0x14005d49e
jmp 0x14005d5d1
mov rax, qword [r8 + r14*8 + 0x8e4c0]
test byte [rax + rsi + 8], 0x40
jne 0x14005d5c7
or byte [rax + rsi + 8], 2
jmp 0x14005d5d1
mov al, byte [r12]
mov byte [rbx], al
add rbx, 1
mov ebp, ebx
sub ebp, r13d
cmp r15d, 1
jne 0x14005d8bc
cmp ebp, edi
je 0x14005d8bc
mov r15d, 1
sub rbx, r15
test byte [rbx], 0x80
jne 0x14005d5fe
add rbx, r15
jmp 0x14005d6b1
mov edx, r15d
jmp 0x14005d613
cmp edx, 4
jg 0x14005d620
cmp rbx, r13
jb 0x14005d620
sub rbx, r15
add edx, r15d
movzx eax, byte [rbx]
cmp byte [rax + r8 + 0x8ca70], dil
je 0x14005d603
movzx ecx, byte [rbx]
movsx eax, byte [rcx + r8 + 0x8ca70]
cmp eax, edi
jne 0x14005d644
call fcn.14004e340
mov dword [rax], 0x2a
or r12d, 0xffffffff
jmp 0x14005d8c1
add eax, r15d
cmp eax, edx
jne 0x14005d653
movsxd rax, edx
add rbx, rax
jmp 0x14005d6b1
mov rax, qword [r8 + r14*8 + 0x8e4c0]
test byte [rax + rsi + 8], 0x48
je 0x14005d69d
add rbx, r15
cmp edx, 2
mov byte [rax + rsi + 9], cl
jl 0x14005d67f
mov al, byte [rbx]
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
add rbx, r15
mov byte [rcx + rsi + 0xa], al
cmp edx, 3
jne 0x14005d695
mov al, byte [rbx]
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
add rbx, r15
mov byte [rcx + rsi + 0xb], al
movsxd rax, edx
sub rbx, rax
jmp 0x14005d6b1
mov ecx, dword [rsp + 0x90]
neg edx
mov r8d, r15d
movsxd rdx, edx
call fcn.140059708
mov rsi, qword [rsp + 0x98]
mov ebp, ebx
mov ebx, dword [rsp + 0x38]
mov eax, ebx
sub ebp, r13d
mov r8, r13
shr eax, 1
xor edx, edx
mov ecx, 0xfde9
mov dword [rsp + 0x28], eax
mov r9d, ebp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd r11, eax
cmp r11d, edi
je 0x14005d703
mov rcx, r11
add rcx, rcx
cmp rcx, rbx
ja 0x14005d703
mov r12d, dword [rsp + 0x34]
lea ebp, [r11 + r11]
jmp 0x14005d8c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14004e380
or r12d, 0xffffffff
jmp 0x14005d8c9
cmp edx, edi
je 0x14005d72c
cmp word [r13], 0xa
jne 0x14005d72c
or byte [rax + rsi + 8], 4
jmp 0x14005d731
and byte [rax + rsi + 8], 0xfb
movsxd r15, ebp
mov rbx, r13
mov r12, r13
lea rbp, [r15 + r13 - 1]
cmp r13, rbp
jae 0x14005d8b7
movzx eax, word [r12]
cmp ax, 0x1a
je 0x14005d895
cmp ax, 0xd
je 0x14005d76d
mov word [rbx], ax
add rbx, 2
add r12, 2
jmp 0x14005d88a
lea rax, [r15 + r13 - 2]
cmp r12, rax
jae 0x14005d793
lea rax, [r12 + 2]
cmp word [rax], 0xa
jne 0x14005d78b
add r12, 4
jmp 0x14005d848
mov r12, rax
jmp 0x14005d881
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0xa8]
mov rcx, qword [rcx + rsi]
mov r8d, 2
add r12, 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x14005d7d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jne 0x14005d87a
cmp dword [rsp + 0x30], edi
je 0x14005d87a
lea r8, [0x140000000]
mov rax, qword [r8 + r14*8 + 0x8e4c0]
test byte [rax + rsi + 8], 0x48
je 0x14005d838
cmp word [rsp + 0xa8], 0xa
je 0x14005d848
mov word [rbx], 0xd
mov al, byte [rsp + 0xa8]
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
mov byte [rcx + rsi + 9], al
mov al, byte [rsp + 0xa9]
mov rcx, qword [r8 + r14*8 + 0x8e4c0]
mov byte [rcx + rsi + 0xa], al
mov rax, qword [r8 + r14*8 + 0x8e4c0]
mov byte [rax + rsi + 0xb], 0xa
jmp 0x14005d886
cmp rbx, r13
jne 0x14005d84f
cmp word [rsp + 0xa8], 0xa
jne 0x14005d84f
mov word [rbx], 0xa
jmp 0x14005d886
mov ecx, dword [rsp + 0x90]
mov rdx, 0xfffffffffffffffe
lea r8d, [rdx + 3]
call fcn.140059708
cmp word [rsp + 0xa8], 0xa
lea r8, [0x140000000]
je 0x14005d88a
jmp 0x14005d881
lea r8, [0x140000000]
mov word [rbx], 0xd
add rbx, 2
cmp r12, rbp
jb 0x14005d748
jmp 0x14005d8b7
mov rax, qword [r8 + r14*8 + 0x8e4c0]
test byte [rax + rsi + 8], 0x40
jne 0x14005d8ab
or byte [rax + rsi + 8], 2
jmp 0x14005d8b7
movzx eax, word [r12]
mov word [rbx], ax
add rbx, 2
mov ebp, ebx
sub ebp, r13d
mov r12d, dword [rsp + 0x34]
mov rsi, qword [rsp + 0x98]
cmp r13, rsi
je 0x14005d8d6
mov rcx, r13
call fcn.14004ca6c
cmp r12d, 0xfffffffe
cmove r12d, ebp
mov eax, r12d
jmp 0x14005d94c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x14005d909
call fcn.14004e340
mov dword [rax], 9
call fcn.14004e360
mov dword [rax], 5
jmp 0x14005d63b
cmp eax, 0x6d
jne 0x14005d913
mov r12d, edi
jmp 0x14005d8c1
mov ecx, eax
call fcn.14004e380
jmp 0x14005d63b
xor eax, eax
jmp 0x14005d94c
call fcn.14004e360
mov dword [rax], edi
call fcn.14004e340
mov dword [rax], 9
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.140050a8c
or eax, 0xffffffff
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret