Function at 0x1403e0910
Capabilities:
Read file on windows

Disassembly:
mov r11, rsp
push rbp
push rsi
lea rbp, [r11 - 0x1c8]
sub rsp, 0x2b8
mov rax, qword [0x1406836b8]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov dword [rsp + 0x34], r9d
mov rsi, rdx
mov qword [rsp + 0x38], r8
test rdx, rdx
je 0x1403e0dc6
mov eax, dword [rdx + 8]
mov qword [r11 - 0x38], r15
inc eax
mov r15, qword [rdx]
movzx ecx, word [r15 + 0x26]
cmp eax, ecx
jge 0x1403e0dbf
mov edx, dword [rdx + 0x10]
xor r9d, r9d
mov rcx, qword [r15 + 8]
xor r8d, r8d
mov qword [r11 - 0x18], rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [r15 + 8]
lea r9, [rsp + 0x30]
xor edi, edi
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], rdi
lea r8d, [rdi + 0x2e]
call sym.ErrorReportClient.exe_SfReadFile
test eax, eax
je 0x1403e0db8
cmp dword [rsp + 0x40], 0x2014b50
jne 0x1403e0db8
movzx eax, word [rsp + 0x5c]
lea ecx, [rdi + 0x42]
mov qword [rsp + 0x2d0], rbx
mov qword [rsp + 0x2a8], r12
mov qword [rsp + 0x2a0], r13
lea r12d, [rax*2 + 0x42]
movzx eax, word [rsp + 0x5e]
mov r13d, r12d
add r12d, eax
movzx eax, word [rsp + 0x60]
inc eax
lea edx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rbx, rax
test rax, rax
je 0x1403e0db1
movzx ecx, word [rsp + 0x46]
mov word [rax], cx
movzx ecx, word [rsp + 0x48]
mov word [rax + 2], cx
movzx ecx, word [rsp + 0x4a]
mov word [rax + 4], cx
movzx ecx, word [rsp + 0x4c]
mov word [rax + 6], cx
movzx ecx, word [rsp + 0x4e]
mov word [rax + 8], cx
mov ecx, dword [rsp + 0x50]
mov dword [rax + 0xc], ecx
mov eax, dword [rsp + 0x54]
mov dword [rbx + 0x10], eax
mov eax, dword [rsp + 0x58]
mov dword [rbx + 0x14], eax
movzx eax, word [rsp + 0x5c]
mov word [rbx + 0x18], ax
movzx eax, word [rsp + 0x5e]
mov word [rbx + 0x1a], ax
movzx eax, word [rsp + 0x60]
mov word [rbx + 0x1c], ax
mov eax, dword [rsp + 0x6a]
mov dword [rbx + 0x20], eax
lea rax, [rbx + 0x40]
mov qword [rbx + 0x28], rax
movzx eax, word [rsp + 0x5c]
mov qword [rsp + 0x298], r14
lea r14d, [rdi + 1]
test ax, ax
je 0x1403e0bcc
movzx edx, ax
lea ecx, [rdi + 0x42]
inc rdx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rdi, rax
test rax, rax
je 0x1403e0b93
movzx r8d, word [rsp + 0x5c]
lea r9, [rsp + 0x30]
mov rcx, qword [r15 + 8]
mov rdx, rax
mov qword [rsp + 0x20], 0
call sym.ErrorReportClient.exe_SfReadFile
test eax, eax
je 0x1403e0b93
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
cmp byte [rdi], 0
je 0x1403e0b1e
lea rax, [rsp + 0x70]
mov dword [rsp + 0x28], 0x104
lea r9d, [r14 - 2]
mov qword [rsp + 0x20], rax
mov r8, rdi
mov edx, r14d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
mov word [rbp + 0x176], ax
jmp 0x1403e0b20
xor eax, eax
mov r9d, 0x2f
lea rcx, [rsp + 0x70]
mov edx, eax
lea r10d, [r9 + 0x2d]
lea r8, [rsp + 0x70]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [r8 + rax*2], 0
jne 0x1403e0b40
cmp edx, eax
jge 0x1403e0b61
cmp r9w, word [rcx]
jne 0x1403e0b59
mov word [rcx], r10w
inc edx
add rcx, 2
jmp 0x1403e0b31
movzx edx, word [rbx + 0x18]
lea r8, [rsp + 0x70]
mov rcx, qword [rbx + 0x28]
inc rdx
mov r9, 0xffffffffffffffff
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
test byte [r15 + 0x18], r14b
je 0x1403e0b98
mov rcx, qword [rbx + 0x28]
call sym.ErrorReportClient.exe_SfGetFileNamePtrW
mov qword [rbx + 0x28], rax
jmp 0x1403e0b98
xor eax, eax
mov r14d, eax
test rdi, rdi
je 0x1403e0bc1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
test r14d, r14d
je 0x1403e0d86
xor edi, edi
cmp word [rsp + 0x5e], 0
je 0x1403e0bfa
lea rdx, [rbx + r13]
mov qword [rsp + 0x20], rdi
mov qword [rbx + 0x30], rdx
lea r9, [rsp + 0x30]
movzx r8d, word [rsp + 0x5e]
mov rcx, qword [r15 + 8]
call sym.ErrorReportClient.exe_SfReadFile
mov r14d, eax
jmp 0x1403e0bfe
mov qword [rbx + 0x30], rdi
test r14d, r14d
je 0x1403e0d86
mov eax, r12d
add rax, rbx
mov qword [rbx + 0x38], rax
movzx eax, word [rsp + 0x60]
test ax, ax
je 0x1403e0cc4
movzx edx, ax
mov ecx, 0x42
inc edx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
xor r12d, r12d
mov rdi, rax
test rax, rax
je 0x1403e0c96
movzx r8d, word [rsp + 0x60]
lea r9, [rsp + 0x30]
mov rcx, qword [r15 + 8]
mov rdx, rax
mov qword [rsp + 0x20], r12
call sym.ErrorReportClient.exe_SfReadFile
test eax, eax
je 0x1403e0c96
mov r8, qword [rbx + 0x38]
lea r14d, [r12 + 1]
mov edx, r12d
mov rcx, rdi
cmp byte [rdi], dl
je 0x1403e0c99
movzx eax, word [rsp + 0x60]
cmp edx, eax
jge 0x1403e0c99
movsx eax, byte [rcx]
inc edx
mov word [r8], ax
inc rcx
add r8, 2
cmp byte [rcx], r12b
jne 0x1403e0c76
jmp 0x1403e0c99
mov r14d, r12d
test rdi, rdi
je 0x1403e0cc2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor edi, edi
test r14d, r14d
je 0x1403e0d86
mov eax, dword [rsi + 0x10]
movzx r8d, word [rsp + 0x5e]
movzx edx, word [rsp + 0x60]
add r8d, eax
inc dword [rsi + 8]
add r8d, edx
mov dword [rsi + 0xc], eax
movzx eax, word [rsp + 0x5c]
add eax, 0x2e
add eax, r8d
mov dword [rsi + 0x10], eax
movsxd rax, dword [rsp + 0x34]
test eax, eax
jle 0x1403e0d17
mov r8, qword [rbx + 0x28]
mov rdx, rax
mov rcx, qword [rsp + 0x38]
mov r9, 0xffffffffffffffff
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, edi
mov r14, qword [rsp + 0x298]
mov r13, qword [rsp + 0x2a0]
mov r12, qword [rsp + 0x2a8]
mov rbx, qword [rsp + 0x2d0]
mov rdi, qword [rsp + 0x2b0]
mov r15, qword [rsp + 0x290]
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.14039bbb0
add rsp, 0x2b8
pop rsi
pop rbp
ret
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0x8004e008
jmp 0x1403e0d3d
mov eax, 0x8007000e
jmp 0x1403e0d45
mov eax, 0x8004e008
jmp 0x1403e0d5d
mov eax, 0x80070057
jmp 0x1403e0d65
mov eax, 0x80070057
jmp 0x1403e0d6d