Function at 0x140012b70
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 [0x14015a338]
xor ebp, ebp
mov r13d, edx
mov r12, rcx
mov rcx, rbx
mov esi, ebp
lea edx, [rbp + 0x78]
lea r8d, [rbp + 0xe]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdi, rax
test rax, rax
jne 0x140012bcc
call fcn.140041e50
mov r8, rax
lea rdx, str.icon
lea rcx, str.Could_not_locate_resource__s:__s
call fcn.140041aa0
jmp 0x140012c21
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
test rax, rax
jne 0x140012bfd
call fcn.140041e50
mov r8, rax
lea rdx, str.icon
lea rcx, str.Could_not_load_resource__s:__s
call fcn.140041aa0
jmp 0x140012c21
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
je 0x140012c21
cmp word [rax + 4], 0x40
jbe 0x140012c43
mov r8d, 0x68
lea rdx, str.C:_src_r3dusb_srcicon.c
lea rcx, str.icondir___NULL__icondir__idCount___64
call fcn.1400a15c4
test rsi, rsi
je 0x140012ec5
cmp word [rsi + 4], 0x40
ja 0x140012ec5
mov qword [rsp + 0x70], r15
test r12, r12
je 0x140012cd7
cmp byte [r12], bpl
jne 0x140012c70
mov edx, 2
lea ecx, [rdx - 1]
call fcn.1400966e0
mov rbx, rax
jmp 0x140012cda
mov dword [rsp + 0x28], ebp
mov r9d, 0xffffffff
mov r8, r12
mov qword [rsp + 0x20], rbp
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rdi, eax
cmp edi, 1
jle 0x140012cd7
mov rcx, rdi
mov edx, 2
call fcn.1400966e0
mov rbx, rax
test rax, rax
je 0x140012cd7
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 0x140012cda
mov rcx, rbx
call fcn.14009b5a0
mov rbx, rbp
xor r9d, r9d
mov qword [rsp + 0x30], rbp
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 0x140012d1c
mov rcx, rbx
call fcn.14009b5a0
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp r15, 0xffffffffffffffff
jne 0x140012d46
call fcn.140041e50
mov r8, rax
lea rcx, str.Unable_to_create_icon__s:__s.
mov rdx, r12
call fcn.140041aa0
jmp 0x140012ec0
xor r9d, r9d
mov rdx, rsi
mov rcx, r15
lea r8d, [r9 + 6]
call fcn.140042b10
test eax, eax
jne 0x140012d75
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_write_icon_header:__s.
call fcn.140041aa0
jmp 0x140012eb2
movzx eax, word [rsi + 4]
movzx ebx, bp
shl eax, 4
add eax, 6
mov dword [rsp + 0x80], eax
movzx eax, word [rsi + 4]
cmp bp, ax
jae 0x140012e1d
nop word [rax + rax]
movzx eax, bx
lea rdx, [rsi + 6]
imul rdi, rax, 0xe
xor r9d, r9d
mov rcx, r15
add rdx, rdi
lea r8d, [r9 + 0xc]
call fcn.140042b10
test eax, eax
je 0x140012efa
movzx edx, word [rdi + rsi + 0x12]
mov r8d, 3
mov rcx, qword [0x14015a338]
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.140042b10
test eax, eax
je 0x140012ee1
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
add dword [rsp + 0x80], eax
inc bx
movzx eax, word [rsi + 4]
cmp bx, ax
jb 0x140012da0
movzx r14d, bp
cmp bp, ax
jae 0x140012e99
nop word [rax + rax]
movzx eax, r14w
mov r8d, 3
imul rcx, rax, 0xe
movzx edx, word [rcx + rsi + 0x12]
mov rcx, qword [0x14015a338]
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.140042b10
test eax, eax
je 0x140012f13
inc r14w
cmp r14w, word [rsi + 4]
jb 0x140012e30
test r13d, r13d
jne 0x140012ead
mov rdx, r12
lea rcx, str.Created:__s
call fcn.140041aa0
mov ebp, 1
test r15, r15
je 0x140012ec0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x78]
mov eax, ebp
mov rbp, qword [rsp + 0x88]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
call fcn.140041e50
mov r8, rax
movzx edx, bx
lea rcx, str.Could_not_write_ICONDIRENTRY__d__offset:__s.
call fcn.140041aa0
jmp 0x140012eb2
call fcn.140041e50
mov r8, rax
movzx edx, bx
lea rcx, str.Could_not_write_ICONDIRENTRY__d_:__s.
call fcn.140041aa0
jmp 0x140012eb2
call fcn.140041e50
mov r8, rax
movzx edx, r14w
lea rcx, str.Could_not_write_icon_data__d:__s.
call fcn.140041aa0
jmp 0x140012eb2