Function at 0x140049420
Capabilities:
Copy file
Extract resource via kernel32 functions
Read file on windows
Set current directory

Disassembly:
mov r11, rsp
push rbp
push rsi
push r15
lea rbp, [r11 - 0x178]
sub rsp, 0x260
mov rax, qword [0x140106438]
xor rax, rsp
mov qword [rbp + 0x130], rax
mov qword [r11 + 0x18], rbx
lea rax, [0x1400e2f28]
mov qword [r11 - 0x20], rdi
mov rsi, 0xffffffffffffffff
xor edi, edi
mov qword [rbp - 0x48], rax
lea rax, [0x1400e2f2c]
mov qword [r11 - 0x30], r13
xorps xmm0, xmm0
mov qword [rbp - 0x40], rax
mov ebx, ecx
mov qword [r11 - 0x38], r14
mov ecx, dword [0x14015a560]
lea rax, [0x1400e2f30]
mov qword [rbp - 0x38], rax
mov r13, rsi
mov dword [rsp + 0x74], r8d
mov r15d, edi
mov byte [rsp + 0x60], dl
mov qword [rbp - 0x78], rdi
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x50], edi
mov qword [rbp - 0x80], rdi
movups xmmword [rbp - 0x68], xmm0
movups xmmword [rbp - 0x58], xmm0
cmp ecx, 5
je 0x1400494d2
cmp ecx, 3
jne 0x1400494c6
cmp byte [0x14015b437], 5
jae 0x1400494d2
lea rdx, [0x140109ee8]
mov r14, rdi
jmp 0x1400494df
lea rdx, [0x140109ef4]
mov r14d, 0x10
cmp ecx, 3
lea rax, [0x14015b438]
mov r9d, 0xca2
cmovne rax, rdx
mov edx, 1
mov ecx, edx
mov qword [rsp + 0x20], rax
xor r8d, r8d
call fcn.14001b7e0
mov r8d, dword [0x14015b550]
mov eax, edi
mov ecx, r8d
mov dword [0x140109f0c], eax
shr ecx, 1
je 0x14004952c
nop dword [rax]
inc eax
shr ecx, 1
jne 0x140049520
mov dword [0x140109f0c], eax
mov dword [0x140109f08], eax
mov rcx, r8
lea eax, [r8 - 1]
mov qword [rsp + 0x250], r12
mov edx, 0x10
mov dword [0x140109f04], eax
mov dword [0x140109f10], r8d
mov dword [0x140109f14], r8d
call fcn.14009653c
mov qword [0x140157668], rax
test rax, rax
je 0x1400495a8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov ecx, ebx
call fcn.140003fa0
mov rbx, rax
test rax, rax
jne 0x140049684
lea rcx, str.No_logical_drive_found__unpartitioned__
call fcn.140041aa0
mov qword [rsp + 0x58], rdi
lea rcx, str.Could_open_volume_for_Syslinux_installation
call fcn.140041aa0
mov r13, qword [rsp + 0x58]
mov rcx, qword [0x140157668]
call fcn.140096520
mov rcx, qword [0x140142a90]
xor ebx, ebx
mov qword [0x140157668], rbx
call fcn.14009b5a0
mov rcx, qword [0x140142a98]
mov qword [0x140142a90], rbx
call fcn.14009b5a0
mov rcx, qword [rbp - 0x80]
mov qword [0x140142a98], rbx
call fcn.14009b5a0
mov r14, qword [rsp + 0x240]
lea rax, [r13 - 1]
mov r12, qword [rsp + 0x250]
mov rdi, qword [rsp + 0x258]
cmp rax, 0xfffffffffffffffd
ja 0x140049643
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov dword [rsp + 0x28], ebx
xor r8d, r8d
mov edx, 0x9001c
mov qword [rsp + 0x20], rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x248]
lea rcx, [rsi - 1]
mov rbx, qword [rsp + 0x290]
cmp rcx, 0xfffffffffffffffd
ja 0x140049666
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r15d
mov rcx, qword [rbp + 0x130]
xor rcx, rsp
call fcn.140092060
add rsp, 0x260
pop r15
pop rsi
pop rbp
ret
mov r9d, 1
xor edx, edx
mov r8d, r9d
mov rcx, rbx
call fcn.140003b60
mov rcx, rbx
mov qword [rsp + 0x58], rax
call fcn.14009b5a0
mov rbx, qword [rsp + 0x58]
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140049597
mov r8d, dword [0x140109f10]
lea r9, [rsp + 0x70]
mov rdx, qword [0x140157668]
mov rcx, rbx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400496f0
lea rcx, str.Could_not_read_VBR
call fcn.140041aa0
mov r13, rbx
jmp 0x1400495a8
mov r8d, dword [0x140109f10]
cmp dword [rsp + 0x70], r8d
je 0x140049712
lea rcx, str.Could_not_read_the_whole_VBR
call fcn.140041aa0
mov r13, rbx
jmp 0x1400495a8
mov rcx, qword [0x140157668]
movzx eax, byte [rcx + 0x15]
cmp al, 0xf0
je 0x140049731
cmp al, 0xf8
jae 0x140049731
lea rax, str.invalid_media_signature__not_an_FAT_NTFS_volume__
jmp 0x14004a647
movzx edx, word [rcx + 0xb]
cmp edx, r8d
jne 0x14004a625
cmp word [rcx + 0xe], di
jne 0x1400497a5
cmp byte [rcx + 0x10], dil
jne 0x1400497a5
cmp byte [rcx + 0x11], dil
jne 0x1400497a5
cmp byte [rcx + 0x12], dil
jne 0x1400497a5
cmp word [rcx + 0x13], di
jne 0x1400497a5
cmp word [rcx + 0x16], di
jne 0x1400497a5
cmp dword [rcx + 0x20], edi
jne 0x1400497a5
movabs rax, 0x202020205346544e
cmp qword [rcx + 3], rax
je 0x1400497a0
movabs rax, 0x302e344e4957534d
cmp qword [rcx + 3], rax
je 0x1400497a0
movabs rax, 0x312e344e4957534d
cmp qword [rcx + 3], rax
je 0x1400497a0
lea rax, str.unknown_OEM_name_but_claims_NTFS
jmp 0x1400497af
mov rax, rdi
jmp 0x1400497af
lea rdx, [rsp + 0x78]
call fcn.14006b4d0
test rax, rax
jne 0x14004a647
xor edx, edx
lea rcx, [0x140158708]
mov r8d, 0x1f4
call fcn.140093c00
call fcn.14006b6f0
cmp dword [0x140158bd8], edi
lea rcx, [0x140000000]
lea r13, [0x1400d984c]
je 0x140049992
cmp dword [0x140158bdc], edi
je 0x140049992
lea rcx, [0x14015a220]
call fcn.140003550
mov rcx, rax
mov rbx, rax
call fcn.1400a4200
test rbx, rbx
je 0x14004981b
mov rcx, rbx
call fcn.14009b5a0
lea r14, [0x140142a90]
lea rsi, [0x140158bd8]
lea r12, str.ldlinux
lea rbx, [0x14015b444]
mov ecx, dword [rsi]
call fcn.14009b5b4
mov qword [r14], rax
test rax, rax
je 0x14004995d
lea rcx, [0x1400e2f28]
test r15d, r15d
lea rax, [0x1400e2f2c]
mov edx, 0x104
cmove rax, rcx
lea r9, str._s_s__s_s_s._s
mov qword [rsp + 0x48], rax
lea rcx, [rbp - 0x20]
mov qword [rsp + 0x40], r12
lea rax, [0x14015b438]
mov qword [rsp + 0x38], rbx
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x30], rax
lea rax, str.syslinux
mov qword [rsp + 0x28], rax
lea rax, [0x1400d97a4]
mov qword [rsp + 0x20], rax
call fcn.1400034e0
lea rdx, [0x1400e30d4]
mov byte [rbp + 0xe3], 0
lea rcx, [rbp - 0x20]
call fcn.14009b898
mov rdi, rax
test rax, rax
je 0x14004996c
mov r8d, dword [rsi]
mov r9, rax
mov rcx, qword [r14]
mov edx, 1
call fcn.1400a6f3c
mov rcx, rdi
mov rbx, rax
call fcn.14009b928
mov edx, dword [rsi]
cmp rbx, rdx
jne 0x140049946
mov rcx, qword [r14]
call fcn.14003d720
test eax, eax
lea r8, [rbp - 0x20]
lea rax, [0x1400d9848]
mov r9, r13
cmovne r9, rax
lea rdx, [0x14015a220]
lea rcx, str.Using_existing__s_s__s
call fcn.140041aa0
inc r15d
lea rbx, [0x14015b444]
add rsi, 4
add r14, 8
cmp r15d, 2
jl 0x140049837
jmp 0x140049a5e
lea r8, [rbp - 0x20]
lea rdx, [0x14015a220]
lea rcx, str.Could_not_read__s_s
call fcn.140041aa0
mov rsi, qword [rsp + 0x68]
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
lea r8, [rbp - 0x20]
lea rdx, [0x14015a220]
lea rcx, str.Could_not_open__s_s
call fcn.140041aa0
mov rsi, qword [rsp + 0x68]
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
lea r13, [rcx + 0xd43c8]
lea rax, [rbp - 0x48]
sub r14, rax
lea rsi, [0x140158bd8]
add r13, r14
lea rcx, str.ldlinux
lea r14, [0x140142a90]
mov r12, rsi
nop dword [rax + rax]
mov edx, 0x40
lea rbx, [rbp - 0x48]
add rbx, r15
lea r9, str._s._s
lea r8, [rdx - 0x41]
mov rax, qword [rbx]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp + 0xf0]
call fcn.1400034e0
mov rdx, qword [rbx + r13]
lea r9, [rbp + 0xf0]
movsxd rax, edi
mov r8d, 0xa
mov dword [rsp + 0x28], 1
mov byte [rbp + 0x12f], 0
mov dword [r12], 0
lea rcx, [rsi + rax*4]
mov qword [rsp + 0x20], rcx
mov rcx, qword [0x14015a338]
call fcn.140040380
mov qword [r15 + r14], rax
test rax, rax
je 0x14004995d
inc edi
lea rcx, str.ldlinux
add r12, 4
add r15, 8
cmp edi, 2
jl 0x1400499c0
lea r12, str.ldlinux
movsx r15d, byte [rsp + 0x60]
mov ecx, r15d
call fcn.1400a1974
lea rcx, [0x1400e2f28]
mov edx, 0x104
mov qword [rsp + 0x30], rcx
lea r9, str._c:_s._s
mov qword [rsp + 0x28], r12
lea rcx, [rbp - 0x20]
mov r8, 0xffffffffffffffff
mov dword [rsp + 0x20], eax
call fcn.1400034e0
xor r13d, r13d
mov byte [rbp + 0xe3], 0
mov qword [rsp + 0x30], r13
lea rcx, [rbp - 0x20]
mov dword [rsp + 0x28], 7
xor r9d, r9d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
lea r8d, [r13 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x68], rax
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140049b02
call fcn.140041e50
mov r8, rax
lea rdx, [rbp - 0x1d]
lea rcx, str.Unable_to_create__s:__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
mov r8d, dword [0x140158bd8]
xor r9d, r9d
mov rdx, qword [0x140142a90]
mov rcx, rsi
call fcn.140042b10
test eax, eax
jne 0x140049b41
call fcn.140041e50
mov r8, rax
lea rdx, [rbp - 0x1d]
lea rcx, str.Could_not_write__s:__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
xor r9d, r9d
lea rdx, [0x140158700]
mov r8d, 0x400
mov rcx, rsi
call fcn.140042b10
test eax, eax
jne 0x140049b7f
call fcn.140041e50
mov r8, rax
lea rdx, [rbp - 0x1d]
lea rcx, str.Could_not_write_ADV_to__s:__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
lea rdx, [rbp - 0x1d]
lea rcx, str.Successfully_wrote__s
call fcn.140041aa0
cmp dword [0x14015a560], 3
je 0x140049baa
movss xmm1, dword [0x1400f6518]
mov ecx, 7
call fcn.140052680
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x140049bcd
lea rcx, str.FlushFileBuffers_failed
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
mov ecx, dword [0x140109f0c]
mov edx, 8
mov eax, dword [0x140158bd8]
mov r14d, dword [0x140109f10]
add eax, 0x3ff
add r14d, eax
shr r14d, cl
movsxd rcx, r14d
call fcn.1400966e0
mov qword [rbp - 0x80], rax
mov rdi, rax
test rax, rax
je 0x140049962
mov eax, dword [rsp + 0x74]
mov edx, eax
test eax, eax
je 0x140049d7b
sub edx, 1
je 0x140049d7b
sub edx, 1
je 0x140049c43
cmp edx, 2
je 0x140049d7b
lea rcx, str.Unsupported_Syslinux_filesystem
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a3
mov ecx, r15d
call fcn.1400a1974
mov edx, 0x40
mov dword [rsp + 0x20], eax
lea r9, [0x1400f06b8]
lea rcx, [rbp + 0xf0]
lea r8, [rdx - 0x41]
call fcn.1400034e0
mov byte [rbp + 0x12f], r13b
lea rdx, [rbp - 0x68]
mov r13, qword [rsp + 0x58]
lea rcx, [rbp + 0xf0]
mov qword [rbp - 0x60], r13
call fcn.14006bb60
test eax, eax
je 0x140049ca5
lea rcx, str.Could_not_fetch_NTFS_volume_info
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a8
xor ebx, ebx
xor edx, edx
nop dword [rax]
test rdx, rdx
js 0x140049e51
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r8, [rbp - 0x70]
lea rax, [rbp - 0x48]
mov qword [rbp - 0x70], rdx
mov dword [rsp + 0x28], 0x20
mov r9d, 8
mov edx, 0x90073
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140049d0e
cmp eax, 0xea
jne 0x140049e51
cmp dword [rbp - 0x58], 0
je 0x140049d65
mov ecx, dword [rbp - 0x54]
test ecx, ecx
je 0x140049d65
mov rax, qword [rbp - 0x30]
test rax, rax
js 0x140049d65
mov rdx, qword [rbp - 0x38]
mov r8d, ecx
imul rax, rcx
mov rcx, rdx
sub rcx, qword [rbp - 0x40]
imul rcx, r8
test rcx, rcx
je 0x140049cb0
dec rcx
cmp ebx, r14d
jge 0x140049cb0
mov qword [rdi], rax
inc ebx
add rdi, 8
inc rax
test rcx, rcx
jne 0x140049d43
jmp 0x140049cb0
lea rcx, str.Could_not_translate_ldlinux.sys_LCN_to_disk_LBA
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a8
mov r13, qword [rsp + 0x58]
lea rcx, [0x140049350]
mov rdx, r13
call fcn.14006ab10
mov rsi, rax
test rax, rax
jne 0x140049db2
lea rcx, str.Syslinux_FAT_access_error
call fcn.140041aa0
mov rsi, qword [rsp + 0x68]
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a8
xor r9d, r9d
lea r8, str.LDLINUX_SYS
xor edx, edx
mov rcx, rsi
xor ebx, ebx
call fcn.14006af40
test eax, eax
jne 0x140049dd9
mov eax, dword [rsi + 0x20]
test eax, eax
jne 0x140049dd9
mov rax, qword [rsi + 0x30]
jmp 0x140049df3
cmp eax, 2
jl 0x140049dfa
cmp eax, dword [rsi + 0x1c]
jge 0x140049dfa
mov ecx, dword [rsi + 0x18]
cdqe
sub rax, 2
shl rax, cl
add rax, qword [rsi + 0x38]
test rax, rax
je 0x140049e1f
jmp 0x140049e01
mov rax, 0xffffffffffffffff
cmp ebx, r14d
jge 0x140049e1f
mov qword [rdi], rax
mov rdx, rax
mov rcx, rsi
add rdi, 8
inc ebx
call fcn.14006ad40
test rax, rax
jne 0x140049e01
mov rdi, qword [rsi + 0x48]
mov qword [rsi + 0x48], 0
mov rcx, rdi
test rdi, rdi
je 0x140049e44
mov rdi, qword [rdi + 8]
call fcn.140096520
mov rcx, rdi
test rdi, rdi
jne 0x140049e33
mov rcx, rsi
call fcn.14009b5a0
mov rsi, qword [rsp + 0x68]
lea rdx, [0x14015b040]
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rdx + rax], 0
jne 0x140049e60
movsxd rcx, eax
lea r14, [0x140000000]
test eax, eax
jle 0x140049e95
nop word [rax + rax]
cmp byte [rcx + r14 + 0x15b040], 0x2f
je 0x140049e95
dec eax
dec rcx
test rcx, rcx
jg 0x140049e80
mov rcx, qword [rbp - 0x80]
mov qword [rsp + 0x20], rdx
mov edx, ebx
movsxd rdi, eax
test eax, eax
jle 0x140049ec0
mov byte [rdi + r14 + 0x15b040], 0
call fcn.14006b820
mov byte [rdi + r14 + 0x15b040], 0x2f
jmp 0x140049ec5
call fcn.14006b820
test eax, eax
jns 0x140049eeb
lea rcx, str.Could_not_patch_Syslinux_files.
call fcn.140041aa0
lea rcx, str.WARNING:_This_could_be_caused_by_your_firewall_having_modified_downloaded_content__such_as_ldlinux.sys...
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a8
mov rbx, qword [rbp - 0x78]
xor r9d, r9d
mov rdx, rbx
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004a603
mov r8d, dword [0x140158bd8]
xor r9d, r9d
mov rdx, qword [0x140142a90]
mov rcx, rsi
call fcn.140042b10
test eax, eax
je 0x14004a603
test rsi, rsi
je 0x140049f44
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, 0xffffffffffffffff
mov qword [rsp + 0x68], rsi
mov r14, qword [rsp + 0x58]
xor r9d, r9d
mov rcx, r14
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004a5e2
mov r8d, dword [0x140109f10]
lea r9, [rsp + 0x70]
mov rdx, qword [0x140157668]
xor r13d, r13d
mov rcx, r14
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14004a5e2
mov edx, dword [rsp + 0x70]
mov r8d, dword [0x140109f10]
cmp edx, r8d
jae 0x140049fb8
lea rcx, str.Partial_read_of_Syslinux_boot_record:_read__d_bytes_but_requested__d
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov r13, r14
jmp 0x1400495a8
cmp dword [rsp + 0x74], 2
mov rdx, qword [0x140142a98]
mov rcx, qword [0x140157668]
je 0x14004a061
movsd xmm0, qword [rdx]
movsd qword [rcx], xmm0
movzx eax, word [rdx + 8]
mov word [rcx + 8], ax
movzx eax, byte [rdx + 0xa]
mov byte [rcx + 0xa], al
add rcx, 0x5a
add rdx, 0x5a
mov eax, 3
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rdx]
lea rdx, [rdx + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm1, xmmword [rdx - 0x70]
movups xmmword [rcx - 0x70], xmm1
movups xmm0, xmmword [rdx - 0x60]
movups xmmword [rcx - 0x60], xmm0
movups xmm1, xmmword [rdx - 0x50]
movups xmmword [rcx - 0x50], xmm1
movups xmm0, xmmword [rdx - 0x40]
movups xmmword [rcx - 0x40], xmm0
movups xmm1, xmmword [rdx - 0x30]
movups xmmword [rcx - 0x30], xmm1
movups xmm0, xmmword [rdx - 0x20]
movups xmmword [rcx - 0x20], xmm0
movups xmm1, xmmword [rdx - 0x10]
movups xmmword [rcx - 0x10], xmm1
sub rax, 1
jne 0x140049ff5
movups xmm0, xmmword [rdx]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rcx + 0x10], xmm1
mov eax, dword [rdx + 0x20]
mov dword [rcx + 0x20], eax
jmp 0x14004a0f1
movzx eax, word [rdx]
mov word [rcx], ax
movzx eax, byte [rdx + 2]
mov byte [rcx + 2], al
add rcx, 0x54
add rdx, 0x54
mov eax, 3
nop dword [rax + rax]
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rdx]
lea rdx, [rdx + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm1, xmmword [rdx - 0x70]
movups xmmword [rcx - 0x70], xmm1
movups xmm0, xmmword [rdx - 0x60]
movups xmmword [rcx - 0x60], xmm0
movups xmm1, xmmword [rdx - 0x50]
movups xmmword [rcx - 0x50], xmm1
movups xmm0, xmmword [rdx - 0x40]
movups xmmword [rcx - 0x40], xmm0
movups xmm1, xmmword [rdx - 0x30]
movups xmmword [rcx - 0x30], xmm1
movups xmm0, xmmword [rdx - 0x20]
movups xmmword [rcx - 0x20], xmm0
movups xmm1, xmmword [rdx - 0x10]
movups xmmword [rcx - 0x10], xmm1
sub rax, 1
jne 0x14004a080
movups xmm0, xmmword [rdx]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rcx + 0x10], xmm1
mov rax, qword [rdx + 0x20]
mov qword [rcx + 0x20], rax
movzx eax, word [rdx + 0x28]
mov word [rcx + 0x28], ax
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004a5c1
mov r8d, dword [0x140109f10]
xor r9d, r9d
mov rdx, qword [0x140157668]
mov rcx, r14
call fcn.140042b10
test eax, eax
je 0x14004a5c1
lea rcx, str.Successfully_wrote_Syslinux_boot_record
call fcn.140041aa0
cmp dword [0x14015a560], 5
jne 0x14004a350
lea rcx, [0x14015a220]
call fcn.140003550
mov rcx, rax
mov rbx, rax
call fcn.1400a4200
test rbx, rbx
je 0x14004a169
mov rcx, rbx
call fcn.14009b5a0
lea rax, str.syslinux
mov edx, 0x104
lea r13, [0x140109ef4]
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x30], r13
lea r9, str._s_s__s
mov qword [rsp + 0x28], rax
lea rcx, [rbp - 0x20]
lea rax, [0x1400d97a4]
mov qword [rsp + 0x20], rax
call fcn.1400034e0
lea rcx, [rbp - 0x20]
mov byte [rbp + 0xe3], 0
call fcn.1400a40cc
mov ecx, r15d
call fcn.1400a1974
lea rcx, [0x1400e2f30]
mov edx, 0x104
mov qword [rsp + 0x30], rcx
lea r9, str._c:_s._s
mov qword [rsp + 0x28], r12
lea rcx, [rbp - 0x20]
mov r8, 0xffffffffffffffff
mov dword [rsp + 0x20], eax
call fcn.1400034e0
lea rdx, [0x1400e30d4]
mov byte [rbp + 0xe3], 0
lea rcx, [rbp - 0x1d]
call fcn.14009b898
test rax, rax
jne 0x14004a223
lea rdx, [rbp - 0x1d]
lea rcx, str.Caution:_No__s_was_provided._The_target_will_be_missing_a_required_Syslinux_file_
call fcn.140041aa0
jmp 0x14004a596
mov rcx, rax
call fcn.14009b928
lea rcx, [rbp - 0x1d]
call fcn.140003550
lea rcx, [rbp - 0x20]
mov rdi, rax
call fcn.140003550
mov r8d, 1
mov rdx, rax
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rdi, rdi
je 0x14004a26d
mov rcx, rdi
call fcn.14009b5a0
test rbx, rbx
je 0x14004a27a
mov rcx, rbx
call fcn.14009b5a0
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x14004a333
lea r8, [rbp - 0x48]
mov ecx, 2
lea rdx, [rbp - 0x1d]
call fcn.14003c000
test eax, eax
je 0x14004a2dd
xor ebx, ebx
lea rdi, [0x14010a780]
nop word [rax + rax]
movsxd rdx, ebx
lea rcx, [rbp - 0x48]
add rdx, rdi
mov r8d, 0x20
call fcn.140093ed0
test eax, eax
je 0x14004a2d8
add ebx, 0x20
cmp ebx, 0xbe0
jb 0x14004a2b0
xor eax, eax
jmp 0x14004a2dd
mov eax, 1
test eax, eax
lea rcx, [0x1400d9848]
lea rax, [0x1400d984c]
cmovne rax, rcx
lea r9, [0x1400d97a4]
mov qword [rsp + 0x38], rax
lea r8, [0x14015a220]
lea rax, [rbp - 0x1d]
mov qword [rsp + 0x30], rax
lea rdx, [rbp - 0x20]
lea rax, str.syslinux
mov qword [rsp + 0x28], r13
lea rcx, str.Created__s__from__s_s_s__s_s___s
mov qword [rsp + 0x20], rax
call fcn.140041aa0
jmp 0x14004a596
call fcn.140041e50
mov r8, rax
lea rdx, [rbp - 0x20]
lea rcx, str.Failed_to_create__s:__s
call fcn.140041aa0
jmp 0x14004a596
cmp byte [0x14015b0c0], r13b
je 0x14004a596
lea rcx, str.Setting_up_ReactOS...
call fcn.140041aa0
mov rbx, qword [0x14015a338]
mov edx, 0x194
mov rcx, rbx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdi, rax
test rax, rax
jne 0x14004a3bb
call fcn.140041e50
mov r8, rax
lea rdx, str.mboot.c32
lea rcx, str.Could_not_locate_resource__s:__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov qword [0x140142aa0], r13
mov r13, r14
jmp 0x1400495a8
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
jne 0x14004a403
call fcn.140041e50
mov r8, rax
lea rdx, str.mboot.c32
lea rcx, str.Could_not_load_resource__s:__s
call fcn.140041aa0
mov rsi, qword [rsp + 0x68]
mov r15d, dword [rsp + 0x50]
mov qword [0x140142aa0], r13
mov r13, r14
jmp 0x1400495a8
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x140158bd0], ebx
mov qword [0x140142aa0], rax
test rax, rax
je 0x14004995d
mov ecx, r15d
call fcn.1400a1974
lea rbx, str.mboot.c32
mov edx, 0x104
mov qword [rsp + 0x28], rbx
lea r9, str._c:_s
mov r8, 0xffffffffffffffff
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x20]
call fcn.1400034e0
xor r9d, r9d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp - 0x20]
mov edx, 0xc0000000
mov byte [rbp + 0xe3], r13b
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x68], rax
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14004a4c1
lea rdx, [rbp - 0x20]
lea rcx, str.Unable_to_create__s_n
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov r13, r14
jmp 0x1400495a8
mov r8d, dword [0x140158bd0]
xor r9d, r9d
mov rdx, qword [0x140142aa0]
mov rcx, rsi
call fcn.140042b10
test eax, eax
jne 0x14004a4fb
lea rdx, [rbp - 0x20]
lea rcx, str.Could_not_write__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov r13, r14
jmp 0x1400495a8
test rsi, rsi
je 0x14004a515
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, 0xffffffffffffffff
mov qword [rsp + 0x68], rsi
mov ecx, r15d
call fcn.1400a1974
lea r9, str._c:_syslinux.cfg
mov dword [rsp + 0x20], eax
mov edx, 0x104
lea rcx, [rbp - 0x20]
mov r8, 0xffffffffffffffff
call fcn.1400034e0
lea rdx, [0x1400d10c4]
mov byte [rbp + 0xe3], r13b
lea rcx, [rbp - 0x20]
call fcn.14009b898
mov rdi, rax
test rax, rax
jne 0x14004a575
lea rcx, str.Could_not_create_ReactOS_syslinux.cfg
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov r13, r14
jmp 0x1400495a8
lea r9, [0x14015b0c0]
mov r8, rbx
lea rdx, str.DEFAULT_ReactOS_nLABEL_ReactOS_n__KERNEL__s_n__APPEND__s
mov rcx, rdi
call fcn.140001010
mov rcx, rdi
call fcn.14009b928
cmp dword [0x14015a560], 3
je 0x14004a5b1
movss xmm1, dword [0x1400f6518]
mov ecx, 7
call fcn.140052680
mov rsi, qword [rsp + 0x68]
mov r15d, 1
jmp 0x1400495a3
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_write_Syslinux_boot_record:__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov r13, r14
jmp 0x1400495a8
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_read_Syslinux_boot_record:__s
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
mov r13, r14
jmp 0x1400495a8
call fcn.140041e50
mov r8, rax
lea rdx, [rbp - 0x1d]
lea rcx, str.Could_not_rewrite__s:__s_n
call fcn.140041aa0
mov r15d, dword [rsp + 0x50]
jmp 0x1400495a8
lea eax, [rdx - 0x200]
cmp eax, 0xe00
ja 0x14004a640
lea eax, [rdx - 1]
test edx, eax
lea rax, str.unsupported_sectors_size
je 0x14004a647
lea rax, str.impossible_sector_size
mov rdx, rax
lea rcx, str.Error:__s
call fcn.140041aa0
mov r13, rbx
jmp 0x1400495a8