Function at 0x140016e00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov rbx, qword [0x1401e8838]
xor esi, esi
mov r13d, edx
mov r12, rcx
mov rcx, rbx
mov ebp, esi
lea edx, [rsi + 0x78]
lea r8d, [rsi + 0xe]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdi, rax
test rax, rax
jne 0x140016eb6
call fcn.140050120
mov r8, rax
lea rdx, str.icon
lea rcx, str.Could_not_locate_resource__s:__s
call fcn.14004f910
mov rax, rsi
lea rbx, [rax + 4]
mov r8d, 0x68
lea rdx, str.D:_a_rufus_rufus_srcicon.c
lea rcx, str.icondir___NULL__icondir__idCount___64
call fcn.1400fc264
test rbp, rbp
je 0x140017165
cmp word [rbx], 0x40
ja 0x140017165
mov qword [rsp + 0x70], r15
test r12, r12
je 0x140016f81
cmp byte [r12], sil
jne 0x140016f1a
mov edx, 2
lea ecx, [rdx - 1]
call fcn.1400c537c
mov rbx, rax
jmp 0x140016f84
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
test rax, rax
jne 0x140016ee5
call fcn.140050120
mov r8, rax
lea rdx, str.icon
lea rcx, str.Could_not_load_resource__s:__s
jmp 0x140016e55
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
je 0x140016e5d
cmp word [rax + 4], 0x40
lea rbx, [rax + 4]
jbe 0x140016e7a
jmp 0x140016e61
mov dword [rsp + 0x28], esi
mov r9d, 0xffffffff
mov r8, r12
mov qword [rsp + 0x20], rsi
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rdi, eax
cmp edi, 1
jle 0x140016f81
mov rcx, rdi
mov edx, 2
call fcn.1400c537c
mov rbx, rax
test rax, rax
je 0x140016f81
mov dword [rsp + 0x28], edi
mov r9d, 0xffffffff
mov r8, r12
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, edi
je 0x140016f84
mov rcx, rbx
call fcn.1400e9080
mov rbx, rsi
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov rcx, rbx
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test rbx, rbx
je 0x140016fc6
mov rcx, rbx
call fcn.1400e9080
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp r15, 0xffffffffffffffff
jne 0x140016ff0
call fcn.140050120
mov r8, rax
lea rcx, str.Unable_to_create_icon__s:__s.
mov rdx, r12
call fcn.14004f910
jmp 0x140017160
xor r9d, r9d
mov rdx, rbp
mov rcx, r15
lea r8d, [r9 + 6]
call fcn.140050f30
test eax, eax
jne 0x14001701f
call fcn.140050120
mov rdx, rax
lea rcx, str.Could_not_write_icon_header:__s.
call fcn.14004f910
jmp 0x140017152
movzx eax, word [rbp + 4]
movzx ebx, si
shl eax, 4
add eax, 6
mov dword [rsp + 0x80], eax
movzx eax, word [rbp + 4]
cmp si, ax
jae 0x1400170bd
movzx eax, bx
xor r9d, r9d
imul rdi, rax, 0xe
lea r8d, [r9 + 0xc]
mov rcx, r15
lea rdx, [rdi + 6]
add rdx, rbp
call fcn.140050f30
test eax, eax
je 0x14001719a
movzx edx, word [rdi + rbp + 0x12]
mov r8d, 3
mov rcx, qword [0x1401e8838]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor r9d, r9d
lea rdx, [rsp + 0x80]
mov rcx, r15
mov rdi, rax
lea r8d, [r9 + 4]
call fcn.140050f30
test eax, eax
je 0x140017181
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
add dword [rsp + 0x80], eax
inc bx
movzx eax, word [rbp + 4]
cmp bx, ax
jb 0x140017040
movzx r14d, si
cmp si, ax
jae 0x140017139
nop word [rax + rax]
movzx eax, r14w
mov r8d, 3
imul rcx, rax, 0xe
movzx edx, word [rcx + rbp + 0x12]
mov rcx, qword [0x1401e8838]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdx, rax
xor ecx, ecx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rdi
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
xor r9d, r9d
mov rdx, rbx
mov r8d, eax
mov rcx, r15
call fcn.140050f30
test eax, eax
je 0x1400171b3
inc r14w
cmp r14w, word [rbp + 4]
jb 0x1400170d0
test r13d, r13d
jne 0x14001714d
mov rdx, r12
lea rcx, str.Created:__s
call fcn.14004f910
mov esi, 1
test r15, r15
je 0x140017160
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x78]
mov eax, esi
mov rbp, qword [rsp + 0x88]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
call fcn.140050120
mov r8, rax
movzx edx, bx
lea rcx, str.Could_not_write_ICONDIRENTRY__d__offset:__s.
call fcn.14004f910
jmp 0x140017152
call fcn.140050120
mov r8, rax
movzx edx, bx
lea rcx, str.Could_not_write_ICONDIRENTRY__d_:__s.
call fcn.14004f910
jmp 0x140017152
call fcn.140050120
mov r8, rax
movzx edx, r14w
lea rcx, str.Could_not_write_icon_data__d:__s.
call fcn.14004f910
jmp 0x140017152