Function at 0x407270
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 [0x0047e2e8]
mov qword [rsp + 0x318], rax
cmp dword [0x0047fb00], 0
jne 0x40771c
lea rcx, [0x0047ffa0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x0047fb00], 0
jne 0x40770f
xor r12d, r12d
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
lea r13, [0x00463658]
mov qword [rsp + 0x20], r13
mov dword [rsp + 0x38], r12d
xor edx, edx
lea rcx, [rsp + 0x20]
call qword [0x00463660]
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 0x407351
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 0x40734a
call fcn.00448f10
xor eax, eax
jmp 0x407721
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 0x40739b
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 0x407394
call fcn.00448f10
xor eax, eax
jmp 0x407721
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
jne 0x4073d6
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 0x4073cf
call fcn.00448f10
xor eax, eax
jmp 0x407721
mov ecx, dword [rsp + 0x38]
cmp edi, ecx
jle 0x40741a
mov eax, 8
cmp ecx, eax
cmovl ecx, eax
mov dword [rsp + 0x38], ecx
cmp edi, ecx
jle 0x407408
add ecx, ecx
mov dword [rsp + 0x38], ecx
cmp edi, ecx
jle 0x407408
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.00449280
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], edi
lea rcx, [rsp + 0x70]
call fcn.00418380
nop
lea rdx, [rsp + 0x2e0]
mov rcx, qword [0x0047fff8]
call fcn.004070c0
nop
mov rdx, rax
lea rcx, [0x0047e2a0]
call fcn.00406440
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 0x407480
call fcn.00448f10
lea rdx, [0x0047e2a0]
lea rcx, [rsp + 0x40]
call fcn.00406250
nop
lea rcx, [rsp + 0x300]
lea r14, [0x00400000]
mov rax, qword [r14 + 0x63d18]
mov qword [rcx], rax
mov rax, qword [r14 + 0x63d20]
mov qword [rcx + 8], rax
mov eax, dword [r14 + 0x63d28]
mov dword [rcx + 0x10], eax
movzx eax, byte [r14 + 0x63d2c]
mov byte [rcx + 0x14], al
mov edx, 0x15
lea rcx, [rsp + 0x300]
call fcn.0040edd0
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 0x407511
mov rdx, qword [rsp + 0x48]
add rdx, rbx
lea rcx, [rdx + 0x10]
mov eax, ebx
sub eax, ebx
movsxd r8, eax
call fcn.00448f40
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 [0x0047e2b0]
lea rcx, [0x0047e2a0]
mov rax, qword [0x0047e2a0]
call qword [rax + 8]
mov r8d, 0x10
mov rdx, qword [0x0047e2a8]
lea rcx, [rsp + 0x2e0]
call fcn.0044a380
lea rdx, [0x0047f9f0]
lea rcx, [rsp + 0x2e0]
call fcn.00401320
mov edx, 0x15
lea rcx, [rsp + 0x300]
call fcn.0040edd0
mov r11, rax
mov rax, qword [rax]
mov qword [r14 + 0x7faf0], rax
mov rax, qword [r11 + 8]
mov qword [r14 + 0x7faf8], 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.00418640
lea rcx, [rsp + 0x70]
call fcn.004180f0
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.00418220
cmp dword [rsp + 0x30], 0
jne 0x407685
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 0x407644
call fcn.00448f10
lea rax, [0x00463630]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x70]
call fcn.00418410
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 0x40767e
call fcn.00448f10
xor eax, eax
jmp 0x407721
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, [0x0047fb20]
call fcn.004402d0
mov dword [0x0047fb00], 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 0x4076d5
call fcn.00448f10
lea rax, [0x00463630]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x70]
call fcn.00418410
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 0x40770f
call fcn.00448f10
lea rcx, [0x0047ffa0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov rcx, qword [rsp + 0x318]
call fcn.00462020
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