Function at 0x407280
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov rax, rsp
sub rsp, 0x338
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax - 8], r12
mov qword [rax - 0x10], r13
mov qword [rax - 0x18], r14
mov rax, qword [0x004792e8]
mov qword [rsp + 0x318], rax
cmp dword [0x0047a7e0], 0
jne 0x40772c
lea rcx, [0x0047ac80]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x0047a7e0], 0
jne 0x40771f
xor r12d, r12d
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
lea r13, [0x0045e628]
mov qword [rsp + 0x20], r13
mov dword [rsp + 0x38], r12d
xor edx, edx
lea rcx, [rsp + 0x20]
call qword [0x0045e630]
nop
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rbx, rax
mov edx, 0x80
lea r8d, [r12 + 0xa]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
test rax, rax
jne 0x407361
mov qword [rsp + 0x20], r13
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], r12d
test rcx, rcx
je 0x40735a
call fcn.00446bf0
xor eax, eax
jmp 0x407731
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
movsxd rdi, eax
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x4073ab
mov qword [rsp + 0x20], r13
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], r12d
test rcx, rcx
je 0x4073a4
call fcn.00446bf0
xor eax, eax
jmp 0x407731
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
jne 0x4073e6
mov qword [rsp + 0x20], r13
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], r12d
test rcx, rcx
je 0x4073df
call fcn.00446bf0
xor eax, eax
jmp 0x407731
mov ecx, dword [rsp + 0x38]
cmp edi, ecx
jle 0x40742a
mov eax, 8
cmp ecx, eax
cmovl ecx, eax
mov dword [rsp + 0x38], ecx
cmp edi, ecx
jle 0x407418
add ecx, ecx
mov dword [rsp + 0x38], ecx
cmp edi, ecx
jle 0x407418
lea ecx, [rdi + 0xb]
mov eax, ecx
and eax, 7
sub ecx, eax
mov dword [rsp + 0x38], ecx
movsxd rdx, ecx
mov rcx, qword [rsp + 0x28]
call fcn.00446f60
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], edi
lea rcx, [rsp + 0x70]
call fcn.00418880
nop
lea rdx, [rsp + 0x2e0]
mov rcx, qword [0x0047acd8]
call fcn.004070d0
nop
mov rdx, rax
lea rcx, [0x004792a0]
call fcn.00406450
nop
mov qword [rsp + 0x2e0], r13
mov rcx, qword [rsp + 0x2e8]
mov qword [rsp + 0x2e8], r12
mov dword [rsp + 0x2f0], r12d
mov dword [rsp + 0x2f8], r12d
test rcx, rcx
je 0x407490
call fcn.00446bf0
lea rdx, [0x004792a0]
lea rcx, [rsp + 0x40]
call fcn.00406260
nop
lea rcx, [rsp + 0x300]
lea r14, [0x00400000]
mov rax, qword [r14 + 0x5ece8]
mov qword [rcx], rax
mov rax, qword [r14 + 0x5ecf0]
mov qword [rcx + 8], rax
mov eax, dword [r14 + 0x5ecf8]
mov dword [rcx + 0x10], eax
movzx eax, byte [r14 + 0x5ecfc]
mov byte [rcx + 0x14], al
mov edx, 0x15
lea rcx, [rsp + 0x300]
call fcn.0040edc0
mov rbp, rax
movsxd rbx, dword [rsp + 0x50]
lea edx, [rbx + 0x10]
lea rcx, [rsp + 0x40]
mov rax, qword [rsp + 0x40]
call qword [rax + 8]
cmp ebx, ebx
jge 0x407521
mov rdx, qword [rsp + 0x48]
add rdx, rbx
lea rcx, [rdx + 0x10]
mov eax, ebx
sub eax, ebx
movsxd r8, eax
call fcn.00446c20
mov rcx, rbx
add rcx, qword [rsp + 0x48]
mov rax, qword [rbp]
mov qword [rcx], rax
mov rax, qword [rbp + 8]
mov qword [rcx + 8], rax
mov byte [rsp + 0x2e0], 0
xor eax, eax
mov qword [rsp + 0x2e1], rax
mov dword [rsp + 0x2e9], eax
mov word [rsp + 0x2ed], ax
mov byte [rsp + 0x2ef], al
mov edx, dword [0x004792b0]
lea rcx, [0x004792a0]
mov rax, qword [0x004792a0]
call qword [rax + 8]
mov r8d, 0x10
mov rdx, qword [0x004792a8]
lea rcx, [rsp + 0x2e0]
call fcn.00448060
lea rdx, [0x0047a6d0]
lea rcx, [rsp + 0x2e0]
call fcn.00401320
mov edx, 0x15
lea rcx, [rsp + 0x300]
call fcn.0040edc0
mov r11, rax
mov rax, qword [rax]
mov qword [r14 + 0x7a7d0], rax
mov rax, qword [r11 + 8]
mov qword [r14 + 0x7a7d8], rax
mov ebx, dword [rsp + 0x50]
mov edx, ebx
lea rcx, [rsp + 0x40]
mov rax, qword [rsp + 0x40]
call qword [rax + 8]
mov r9d, 4
mov r8d, ebx
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x70]
call fcn.00418b40
lea rcx, [rsp + 0x70]
call fcn.004185f0
mov edx, dword [rsp + 0x30]
lea rcx, [rsp + 0x20]
mov rax, qword [rsp + 0x20]
call qword [rax + 8]
mov r9, rdi
mov r8, qword [rsp + 0x28]
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.00418720
cmp dword [rsp + 0x30], 0
jne 0x407695
mov qword [rsp + 0x40], r13
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], r12d
mov dword [rsp + 0x58], r12d
test rcx, rcx
je 0x407654
call fcn.00446bf0
lea rax, [0x0045e600]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x70]
call fcn.00418910
nop
mov qword [rsp + 0x20], r13
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], r12d
test rcx, rcx
je 0x40768e
call fcn.00446bf0
xor eax, eax
jmp 0x407731
mov rdx, qword [rsp + 0x28]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], r12d
mov r8d, edi
lea rcx, [0x0047a800]
call fcn.004405a0
mov dword [0x0047a7e0], 1
mov qword [rsp + 0x40], r13
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], r12d
mov dword [rsp + 0x58], r12d
test rcx, rcx
je 0x4076e5
call fcn.00446bf0
lea rax, [0x0045e600]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x70]
call fcn.00418910
nop
mov qword [rsp + 0x20], r13
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], r12d
test rcx, rcx
je 0x40771f
call fcn.00446bf0
lea rcx, [0x0047ac80]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov rcx, qword [rsp + 0x318]
call fcn.0045d640
mov rbx, qword [rsp + 0x340]
mov rbp, qword [rsp + 0x348]
mov rsi, qword [rsp + 0x350]
mov rdi, qword [rsp + 0x358]
mov r12, qword [rsp + 0x330]
mov r13, qword [rsp + 0x328]
mov r14, qword [rsp + 0x320]
add rsp, 0x338
ret