Function at 0x140006dd0
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file via mapping

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x398
mov r9d, 0x104
lea rbx, [rsp + 0x180]
movsxd rsi, edx
mov rdi, r8
mov rdx, rcx
mov qword [rsp + 0x20], rbx
lea r8, str..exe
xor ecx, ecx
mov qword [rsp + 0x28], 0
call qword [sym.imp.kernel32.dll_SearchPathW]
sub eax, 1
cmp eax, 0x103
ja 0x140007640
mov r8d, 2
xor edx, edx
mov rcx, rbx
call qword [sym.imp.kernel32.dll_LoadLibraryExW]
mov r12, rax
test rax, rax
je 0x140007040
test esi, esi
js 0x140006f10
lea rax, [rsp + 0x48]
mov dword [rsp + 0x58], esi
lea r9, [rsp + 0x50]
mov rcx, r12
mov qword [rsp + 0x48], 0
lea r8, [dbg.EnumResNameProc]
mov edx, 0xe
mov qword [rsp + 0x50], rax
call qword [sym.imp.kernel32.dll_EnumResourceNamesW]
test eax, eax
jne 0x140006e93
cmp dword [rsp + 0x58], 0xffffffff
je 0x140006e93
test byte [0x140010000], 8
jne 0x140007390
mov r13, qword [rsp + 0x48]
test r13, r13
je 0x1400076d5
mov rdx, r13
mov rcx, r12
mov r14d, 0x80004005
call qword [sym.imp.kernel32.dll_LoadResource]
mov r13, rax
test rax, rax
je 0x140006ef0
mov rcx, rax
call qword [sym.imp.kernel32.dll_LockResource]
mov r8, rax
test rax, rax
je 0x140006ee1
mov rdx, r12
xor ecx, ecx
xor r14d, r14d
call dbg.add_module_icons_to_stream
mov qword [rdi], rax
test rax, rax
jne 0x140006ee7
mov r14d, 0x80004005
mov rcx, r13
call qword [sym.imp.kernel32.dll_FreeResource]
mov rcx, r12
call qword [sym.imp.kernel32.dll_FreeLibrary]
mov eax, r14d
add rsp, 0x398
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
neg esi
mov r8d, 0xe
mov rcx, rax
movzx edx, si
call qword [sym.imp.kernel32.dll_FindResourceW]
mov qword [rsp + 0x48], rax
mov r13, rax
test byte [0x140010000], 8
je 0x140006e98
mov rax, qword gs:[0x30]
mov esi, dword [rax + 0x68]
mov rax, rbx
shr rax, 0x10
je 0x140007520
mov rdx, 0xffffffffffffffff
mov rcx, rbx
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x1400071ac
movzx eax, word [rsp + 0x180]
test ax, ax
je 0x140007677
xor edx, edx
nop dword [rax + rax]
mov ecx, edx
add rdx, 1
cmp word [rbx + rdx*2], 0
jne 0x140006f90
mov edx, 0x224c
lea r9, [rsp + 0x172]
lea r10, str.0123456789abcdefwrite_freedesktop_mime_type_entry
mov word [rsp + 0x50], dx
lea rdx, [rsp + 0x52]
jmp 0x140007003
cmp ax, 9
je 0x1400073e0
cmp ax, 0xa
jne 0x140007403
mov eax, 0x6e5c
add rdx, 2
mov word [rdx - 2], ax
nop dword [rax]
lea r8d, [rcx - 1]
cmp rdx, r9
ja 0x140007180
test ecx, ecx
jle 0x140007180
movzx eax, word [rbx]
mov ecx, r8d
add rbx, 2
cmp ax, 0xd
je 0x1400073c8
jbe 0x140006fc0
cmp ax, 0x22
je 0x140007460
cmp ax, 0x5c
jne 0x1400073f4
mov r11d, 0x5c5c
add rdx, 2
mov word [rdx - 2], r11w
jmp 0x140006fe8
mov rbp, qword gs:[0x30]
cmp dword [rbp + 0x68], 0xc1
je 0x140007240
test byte [0x140010000], 4
jne 0x140007088
mov rax, qword gs:[0x30]
mov r14d, dword [rax + 0x68]
movzx eax, r14w
or eax, 0x80070000
test r14d, r14d
cmovg r14d, eax
jmp 0x140006ef9
mov rax, rbx
mov esi, dword [rbp + 0x68]
shr rax, 0x10
je 0x140007580
mov rdx, 0xffffffffffffffff
mov rcx, rbx
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x140007212
movzx eax, word [rsp + 0x180]
test ax, ax
je 0x140007694
xor edx, edx
nop
mov ecx, edx
add rdx, 1
cmp word [rbx + rdx*2], 0
jne 0x1400070d0
mov r8d, 0x224c
lea rdx, [rsp + 0x52]
lea r9, [rsp + 0x172]
mov word [rsp + 0x50], r8w
lea r10, str.0123456789abcdefwrite_freedesktop_mime_type_entry
jmp 0x140007143
cmp ax, 9
je 0x140007508
cmp ax, 0xa
jne 0x140007499
mov r12d, 0x6e5c
add rdx, 2
mov word [rdx - 2], r12w
nop dword [rax + rax]
lea r8d, [rcx - 1]
cmp rdx, r9
ja 0x1400071e8
test ecx, ecx
jle 0x1400071e8
movzx eax, word [rbx]
mov ecx, r8d
add rbx, 2
cmp ax, 0xd
je 0x140007478
jbe 0x140007100
cmp ax, 0x22
je 0x1400074f0
cmp ax, 0x5c
jne 0x14000748a
mov r8d, 0x5c5c
add rdx, 2
mov word [rdx - 2], r8w
jmp 0x140007128
mov byte [rdx], 0x22
test r8d, r8d
jle 0x14000768b
mov r9d, 0x2e2e
mov byte [rdx + 3], 0x2e
lea rax, [rdx + 4]
mov word [rdx + 1], r9w
mov byte [rax], 0
lea rcx, [rsp + 0x50]
call dbg.__wine_dbg_strdup
mov dword [rsp + 0x30], esi
lea r9, str.FindResourceW___s__called__return__p__error__ld_n
lea r8, global___func__.1
mov ecx, 3
mov qword [rsp + 0x28], r13
lea rdx, [0x140010000]
mov qword [rsp + 0x20], rax
call sym.wine_dbg_log.constprop.0
mov r13, qword [rsp + 0x48]
jmp 0x140006e98
mov byte [rdx], 0x22
test r8d, r8d
jle 0x1400076a8
mov ecx, 0x2e2e
mov byte [rdx + 3], 0x2e
lea rax, [rdx + 4]
mov word [rdx + 1], cx
mov byte [rax], 0
lea rcx, [rsp + 0x50]
call dbg.__wine_dbg_strdup
mov dword [rsp + 0x28], esi
lea r9, str.LoadLibraryExW___s__failed__error__ld_n
lea r8, global___func__.1
mov ecx, 2
mov qword [rsp + 0x20], rax
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000705f
mov qword [rsp + 0x30], 0
xor r9d, r9d
mov r8d, 3
mov rcx, rbx
mov dword [rsp + 0x28], 0x10000000
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.kernel32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1400077d9
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x28], 0
mov r8d, 0x8000002
call qword [sym.imp.kernel32.dll_CreateFileMappingW]
mov r13, rax
test rax, rax
je 0x1400077b8
xor edx, edx
mov rcx, r15
call qword [sym.imp.kernel32.dll_GetFileSize]
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov qword [rsp + 0x20], 0
mov r14d, eax
mov rcx, r13
call qword [sym.imp.kernel32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
je 0x1400078a6
cmp r14d, 0x40
jbe 0x140007713
cmp word [rax], 0x5a4d
jne 0x140007713
mov eax, dword [rax + 0x3c]
mov r9d, r14d
add r9, rbx
add rax, rbx
lea rdx, [rax + 0x40]
cmp r9, rdx
jb 0x14000774a
cmp word [rax], 0x454e
jne 0x14000774a
movzx edx, word [rax + 0x24]
add rdx, rax
lea rax, [rdx + 2]
cmp r9, rax
jb 0x140007538
movzx ecx, word [rdx]
add rdx, 0xa
xor r10d, r10d
cmp r9, rdx
jae 0x140007373
jmp 0x140007538
cmp dx, 0x8003
cmove r10, rax
movzx edx, word [rax + 2]
lea rdx, [rdx + rdx*2]
lea rax, [rax + rdx*4 + 8]
lea rdx, [rax + 8]
cmp r9, rdx
jb 0x140007538
movzx edx, word [rax]
test dx, dx
je 0x140007598
cmp dx, 0x800e
jne 0x140007350
mov r12, rax
jmp 0x140007359
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x68]
lea r9, str.EnumResourceNamesW_failed__error__ld_n
lea r8, global___func__.1
mov ecx, 3
lea rdx, [0x140010000]
mov dword [rsp + 0x20], eax
call sym.wine_dbg_log.constprop.0
jmp 0x140006e93
mov r15d, 0x725c
add rdx, 2
mov word [rdx - 2], r15w
jmp 0x140006fe8
mov r14d, 0x745c
add rdx, 2
mov word [rdx - 2], r14w
jmp 0x140006fe8
lea r8d, [rax - 0x20]
cmp r8w, 0x5e
jbe 0x140007570
mov r8d, eax
mov byte [rdx], 0x5c
add rdx, 5
shr r8w, 0xc
and r8d, 0xf
movzx r8d, byte [r10 + r8]
mov byte [rdx - 4], r8b
mov r8d, eax
shr r8w, 8
and r8d, 0xf
movzx r8d, byte [r10 + r8]
mov byte [rdx - 3], r8b
mov r8d, eax
and eax, 0xf
shr r8w, 4
movzx eax, byte [r10 + rax]
and r8d, 0xf
movzx r8d, byte [r10 + r8]
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
jmp 0x140006fe8
mov ebp, 0x225c
add rdx, 2
mov word [rdx - 2], bp
jmp 0x140006fe8
mov ebp, 0x725c
add rdx, 2
mov word [rdx - 2], bp
jmp 0x140007128
lea r8d, [rax - 0x20]
cmp r8w, 0x5e
jbe 0x140007630
mov r8d, eax
mov byte [rdx], 0x5c
add rdx, 5
shr r8w, 0xc
and r8d, 0xf
movzx r8d, byte [r10 + r8]
mov byte [rdx - 4], r8b
mov r8d, eax
shr r8w, 8
and r8d, 0xf
movzx r8d, byte [r10 + r8]
mov byte [rdx - 3], r8b
mov r8d, eax
and eax, 0xf
shr r8w, 4
movzx eax, byte [r10 + rax]
and r8d, 0xf
movzx r8d, byte [r10 + r8]
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
jmp 0x140007128
mov r11d, 0x225c
add rdx, 2
mov word [rdx - 2], r11w
jmp 0x140007128
mov edi, 0x745c
add rdx, 2
mov word [rdx - 2], di
jmp 0x140007128
movzx edx, bx
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
jmp 0x1400071ac
mov r14d, 0x80004005
test byte [0x140010000], 4
jne 0x1400076b1
mov rsi, qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, r15
call rsi
mov rcx, r13
call rsi
mov rcx, rbx
call qword [sym.imp.kernel32.dll_UnmapViewOfFile]
jmp 0x140006ef9
mov byte [rdx], al
add rdx, 1
jmp 0x140006fe8
movzx edx, bx
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
jmp 0x140007212
test r12, r12
je 0x1400079fc
test r10, r10
je 0x1400079c5
movzx eax, word [r12 + 2]
cmp esi, eax
jge 0x140007906
lea rax, [rsi + rsi*2]
lea rax, [r12 + rax*4 + 8]
lea rdx, [rax + 0xc]
cmp r9, rdx
jb 0x1400078cf
movzx r8d, word [rax]
shl r8d, cl
movsxd r8, r8d
add r8, rbx
movzx edx, word [r8 + 4]
lea rax, [rdx*8]
sub rax, rdx
lea rax, [r8 + rax*2 + 0x14]
cmp r9, rax
jb 0x140007781
mov word [rsp + 0x68], cx
xor edx, edx
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x58], r14d
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], r10
call dbg.add_module_icons_to_stream
cmp rax, 1
mov qword [rdi], rax
sbb r14d, r14d
and r14d, 0x80004005
jmp 0x14000754b
mov byte [rdx], al
add rdx, 1
jmp 0x140007128
mov r14d, 0x80070490
test byte [0x140010000], 4
je 0x140006ef9
lea r9, str.SearchPath_failed_n
lea r8, global___func__.1
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x140006ef9
mov eax, 0x224c
mov byte [rsp + 0x52], 0x22
lea rdx, [rsp + 0x52]
mov word [rsp + 0x50], ax
lea rax, [rdx + 1]
jmp 0x14000719f
mov ecx, 0x224c
mov byte [rsp + 0x52], 0x22
lea rdx, [rsp + 0x52]
mov word [rsp + 0x50], cx
lea rax, [rdx + 1]
jmp 0x140007205
lea r9, str.file_too_small_for_resource_table_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
test byte [0x140010000], 4
jne 0x1400076f2
mov rcx, r12
mov r14d, 0x80070490
call qword [sym.imp.kernel32.dll_FreeLibrary]
jmp 0x140006ef9
lea r9, str.found_no_icon_n
lea r8, global___func__.1
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x1400076de
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.file_too_small_for_MZ_header_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.file_too_small_for_NE_header_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.file_too_small_for_GRPICONDIR_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
test byte [0x140010000], 4
jne 0x14000793d
mov rcx, r15
call qword [sym.imp.kernel32.dll_CloseHandle]
mov r14d, 0x80004005
jmp 0x140006ef9
test byte [0x140010000], 4
je 0x1400077ce
mov rax, rbx
mov esi, dword [rbp + 0x68]
shr rax, 0x10
je 0x140007a5e
or rdx, 0xffffffffffffffff
mov rcx, rbx
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x140007998
xor eax, eax
mov edx, eax
add rax, 1
cmp word [rbx + rax*2 - 2], 0
jne 0x140007814
mov word [rsp + 0x50], 0x224c
lea rax, [rsp + 0x52]
lea r9, [rsp + 0x172]
lea rcx, str.0123456789abcdefwrite_freedesktop_mime_type_entry
jmp 0x14000785f
cmp dx, 9
je 0x140007af9
cmp dx, 0xa
jne 0x140007a7d
mov word [rax], 0x6e5c
add rax, 2
mov edx, r10d
lea r10d, [rdx - 1]
cmp rax, r9
ja 0x140007971
test edx, edx
jle 0x140007971
movzx edx, word [rbx]
add rbx, 2
cmp dx, 0xd
je 0x140007add
jbe 0x14000783f
cmp dx, 0x22
je 0x140007aeb
cmp dx, 0x5c
jne 0x140007a72
mov word [rax], 0x5c5c
add rax, 2
jmp 0x14000785c
test byte [0x140010000], 4
jne 0x140007a33
mov rbx, qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, r15
mov r14d, 0x80004005
call rbx
mov rcx, r13
call rbx
jmp 0x140006ef9
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.file_too_small_for_icon_group_NE_NAMEINFO_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.icon_index_out_of_range_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
mov eax, dword [rbp + 0x68]
lea r9, str.CreateFileMapping_failed__error__ld_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
mov dword [rsp + 0x20], eax
call sym.wine_dbg_log.constprop.0
mov rcx, r15
call qword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x1400077ce
mov byte [rax], 0x22
lea rdx, [rax + 1]
test r10d, r10d
jle 0x14000798b
mov word [rax + 1], 0x2e2e
lea rdx, [rax + 4]
mov byte [rax + 3], 0x2e
mov byte [rdx], 0
lea rcx, [rsp + 0x50]
call dbg.__wine_dbg_strdup
mov dword [rsp + 0x28], esi
lea r9, str.opening__s_failed_with_error__ld_n
lea r8, str.open_module16_icon
mov ecx, 2
mov qword [rsp + 0x20], rax
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x1400077ce
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.no_icon_resource_type_found_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
mov r14d, 0x80004005
test byte [0x140010000], 4
je 0x14000754b
lea r9, str.no_group_icon_resource_type_found_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x14000754b
mov eax, dword [rbp + 0x68]
lea r9, str.MapViewOfFile_failed__error__ld_n
lea r8, str.open_module16_icon
mov ecx, 2
lea rdx, [0x140010000]
mov dword [rsp + 0x20], eax
call sym.wine_dbg_log.constprop.0
jmp 0x1400078b3
movzx edx, bx
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
jmp 0x140007998
lea r8d, [rdx - 0x20]
cmp r8w, 0x5e
jbe 0x140007ad2
mov r8d, edx
mov byte [rax], 0x5c
add rax, 5
shr r8w, 0xc
and r8d, 0xf
movzx r8d, byte [rcx + r8]
mov byte [rax - 4], r8b
mov r8d, edx
shr r8w, 8
and r8d, 0xf
movzx r8d, byte [rcx + r8]
mov byte [rax - 3], r8b
mov r8d, edx
and edx, 0xf
shr r8w, 4
movzx edx, byte [rcx + rdx]
and r8d, 0xf
movzx r8d, byte [rcx + r8]
mov byte [rax - 1], dl
mov byte [rax - 2], r8b
jmp 0x14000785c
mov byte [rax], dl
add rax, 1
jmp 0x14000785c
mov word [rax], 0x725c
add rax, 2
jmp 0x14000785c
mov word [rax], 0x225c
add rax, 2
jmp 0x14000785c
mov word [rax], 0x745c
add rax, 2
jmp 0x14000785c