Function at 0x40cda0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x40]
mov qword [rbp + 0xf0], 0xfffffffffffffffe
mov dword [rbp + 0x40], 0
mov qword [rbp + 0x48], 0
mov rax, qword [rbp + 0x130]
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x20], 0
mov rax, qword [rbp + 0x138]
mov qword [rbp], rax
cmp qword [rbp], 0
jne 0x40ce10
mov qword [rbp + 0xf8], 0
jmp 0x40cf54
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cdqe
shl rax, 1
mov dword [rbp + 0x44], eax
cmp dword [rbp + 0x44], 0x400
jg 0x40ce62
movsxd rax, dword [rbp + 0x44]
mov rcx, rax
call fcn.0040c430
movzx eax, al
test eax, eax
je 0x40ce62
movsxd rax, dword [rbp + 0x44]
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.004330e0
sub rsp, rax
lea rax, [rsp + 0x40]
mov qword [rbp + 0x98], rax
jmp 0x40cebb
mov rax, qword [rbp + 0x80]
mov qword [rbp + 0x98], rax
movsxd rax, dword [rbp + 0x44]
add rax, 0x10
mov rcx, rax
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rbp + 0x78], rax
cmp qword [rbp + 0x78], 0
jne 0x40ce99
mov qword [rbp + 0x98], 0
jmp 0x40cebb
mov rax, qword [rbp + 0x78]
mov rcx, qword [rbp + 0x48]
mov qword [rax], rcx
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x78]
add rax, 0x10
mov qword [rbp + 0x98], rax
cmp qword [rbp + 0x98], 0
je 0x40cecc
cmp qword [rbp], 0
jne 0x40ced9
mov qword [rbp + 0x90], 0
jmp 0x40cf46
mov rax, qword [rbp + 0x98]
mov byte [rax], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rbp + 0x44]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0x98]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rbp]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rbp + 0x88], eax
cmp dword [rbp + 0x88], 0
jne 0x40cf38
mov qword [rbp + 0x90], 0
jmp 0x40cf46
mov rax, qword [rbp + 0x98]
mov qword [rbp + 0x90], rax
mov rax, qword [rbp + 0x90]
mov qword [rbp + 0xf8], rax
mov rax, qword [rbp + 0xf8]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x40cfa1
mov dword [rbp + 0x70], 0x8007000e
cmp qword [rbp + 0x48], 0
je 0x40cf99
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov qword [rbp + 0x48], rax
mov rcx, qword [rbp + 0xa0]
call qword [sym.imp.msvcrt.dll_free]
jmp 0x40cf6d
mov eax, dword [rbp + 0x70]
jmp 0x40d2fa
mov r8d, 2
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov qword [rbp + 0x18], rax
cmp qword [rbp + 0x18], 0
jne 0x40d01f
xor eax, eax
cmp eax, 1
je 0x40cfc7
jmp 0x40cfde
mov r9, qword [rbp + 8]
lea r8, str.Failed_to_LoadLibrary_on__s_n
xor edx, edx
mov ecx, 0x100
call fcn.0040d330
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x40cff6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x100], eax
jmp 0x40d011
call qword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0x70000
or eax, 0x80000000
mov dword [rbp + 0x100], eax
mov eax, dword [rbp + 0x100]
mov dword [rbp + 0x60], eax
jmp 0x40d2b4
mov r8, qword [rbp + 0x148]
mov rdx, qword [rbp + 0x140]
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov qword [rbp + 0x58], rax
cmp qword [rbp + 0x58], 0
jne 0x40d0f4
cmp qword [rbp + 0x140], 0xffff
ja 0x40d084
xor eax, eax
cmp eax, 1
je 0x40d05c
jmp 0x40d082
mov rax, qword [rbp + 0x148]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp + 0x140]
lea r8, str.Failed_to_FindResource_on_ID:_d_TYPE:_s_n
xor edx, edx
mov ecx, 0x100
call fcn.0040d330
jmp 0x40d0b3
xor eax, eax
cmp eax, 1
je 0x40d08d
jmp 0x40d0b3
mov rax, qword [rbp + 0x148]
mov qword [rsp + 0x20], rax
mov r9, qword [rbp + 0x140]
lea r8, str.Failed_to_FindResource_on_ID:_s_TYPE:_s_n
xor edx, edx
mov ecx, 0x100
call fcn.0040d330
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x40d0cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x104], eax
jmp 0x40d0e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0x70000
or eax, 0x80000000
mov dword [rbp + 0x104], eax
mov eax, dword [rbp + 0x104]
mov dword [rbp + 0x60], eax
jmp 0x40d2b4
mov rdx, qword [rbp + 0x58]
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov qword [rbp + 0x68], rax
cmp qword [rbp + 0x68], 0
jne 0x40d16a
xor eax, eax
cmp eax, 1
je 0x40d116
jmp 0x40d129
lea r8, str.Failed_to_LoadResource__n
xor edx, edx
mov ecx, 0x100
call fcn.0040d330
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x40d141
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x108], eax
jmp 0x40d15c
call qword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0x70000
or eax, 0x80000000
mov dword [rbp + 0x108], eax
mov eax, dword [rbp + 0x108]
mov dword [rbp + 0x60], eax
jmp 0x40d2b4
mov rdx, qword [rbp + 0x58]
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [rbp + 0x30], eax
mov rax, qword [rbp + 0x68]
mov qword [rbp + 0x10], rax
mov eax, dword [rbp + 0x30]
mov rcx, qword [rbp + 0x10]
movsx eax, byte [rcx + rax]
test eax, eax
je 0x40d285
mov eax, dword [rbp + 0x30]
inc eax
cmp eax, 0x400
ja 0x40d1dd
mov eax, dword [rbp + 0x30]
inc eax
mov eax, eax
mov rcx, rax
call fcn.0040c430
movzx eax, al
test eax, eax
je 0x40d1dd
mov eax, dword [rbp + 0x30]
inc eax
mov eax, eax
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.004330e0
sub rsp, rax
lea rax, [rsp + 0x40]
mov qword [rbp + 0x110], rax
jmp 0x40d248
mov rax, qword [rbp + 0xb0]
mov qword [rbp + 0x110], rax
mov eax, dword [rbp + 0x30]
inc eax
mov eax, eax
add rax, 0x10
mov rcx, rax
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rbp + 0xa8], rax
cmp qword [rbp + 0xa8], 0
jne 0x40d21d
mov qword [rbp + 0x110], 0
jmp 0x40d248
mov rax, qword [rbp + 0xa8]
mov rcx, qword [rbp + 0x48]
mov qword [rax], rcx
mov rax, qword [rbp + 0xa8]
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0xa8]
add rax, 0x10
mov qword [rbp + 0x110], rax
mov rax, qword [rbp + 0x110]
mov qword [rbp + 0x10], rax
cmp qword [rbp + 0x10], 0
jne 0x40d263
mov dword [rbp + 0x60], 0x8007000e
jmp 0x40d2b4
mov eax, dword [rbp + 0x30]
inc eax
mov eax, eax
mov r8, rax
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x10]
call sub.msvcrt.dll_memcpy
mov eax, dword [rbp + 0x30]
mov rcx, qword [rbp + 0x10]
mov byte [rcx + rax], 0
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x50], rax
cmp qword [rbp + 0x50], 0
jne 0x40d29d
mov dword [rbp + 0x60], 0x8007000e
jmp 0x40d2b4
mov r8d, dword [rbp + 0x150]
mov rdx, qword [rbp + 0x50]
lea rcx, [rbp + 0x20]
call fcn.0040d5b0
mov dword [rbp + 0x60], eax
cmp qword [rbp + 0x18], 0
je 0x40d2c5
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [rbp + 0x60]
mov dword [rbp + 0x74], eax
cmp qword [rbp + 0x48], 0
je 0x40d2f7
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0xe8], rax
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov qword [rbp + 0x48], rax
mov rcx, qword [rbp + 0xe8]
call qword [sym.imp.msvcrt.dll_free]
jmp 0x40d2cb
mov eax, dword [rbp + 0x74]
lea rsp, [rbp + 0x120]
pop rbp
ret