Function at 0x4046e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov rax, rsp
sub rsp, 0x338
mov qword [rsp + 0x80], 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 rax, qword [0x0046b048]
mov qword [rsp + 0x318], rax
cmp dword [0x0046c360], 0
jne 0x404b3f
lea rcx, [0x0046cc70]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x0046c360], 0
jne 0x404b32
xor r12d, r12d
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x30], r12d
lea r13, [0x00453650]
mov qword [rsp + 0x20], r13
mov dword [rsp + 0x38], r12d
xor edx, edx
lea rcx, [rsp + 0x20]
call qword [0x00453658]
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 0x4047c0
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 0x4047b9
call fcn.0042a7a0
xor eax, eax
jmp 0x404b44
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 0x40480a
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 0x404803
call fcn.0042a7a0
xor eax, eax
jmp 0x404b44
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
jne 0x404845
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 0x40483e
call fcn.0042a7a0
xor eax, eax
jmp 0x404b44
mov ecx, dword [rsp + 0x38]
cmp edi, ecx
jle 0x404889
mov eax, 8
cmp ecx, eax
cmovl ecx, eax
mov dword [rsp + 0x38], ecx
cmp edi, ecx
jle 0x404877
add ecx, ecx
mov dword [rsp + 0x38], ecx
cmp edi, ecx
jle 0x404877
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.0042a6f0
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], edi
lea rcx, [rsp + 0x90]
call fcn.00413b60
nop
lea rdx, [rsp + 0x60]
mov rcx, qword [0x0046cca8]
call fcn.00403240
nop
mov rdx, rax
lea rcx, section..data
call fcn.00404390
nop
mov qword [rsp + 0x60], r13
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x68], r12
mov dword [rsp + 0x70], r12d
mov dword [rsp + 0x78], r12d
test rcx, rcx
je 0x4048e0
call fcn.0042a7a0
lea rdx, section..data
lea rcx, [rsp + 0x40]
call fcn.004041a0
nop
lea rcx, [rsp + 0x300]
mov rax, qword [str.r1g2s3r4i5h6s7_8e9u0]
mov qword [rcx], rax
mov rax, qword [0x00453bd0]
mov qword [rcx + 8], rax
mov eax, dword [0x00453bd8]
mov dword [rcx + 0x10], eax
movzx eax, byte [0x00453bdc]
mov byte [rcx + 0x14], al
mov edx, 0x15
lea rcx, [rsp + 0x300]
call fcn.0040bde0
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 0x404968
mov rdx, qword [rsp + 0x48]
add rdx, rbx
lea rcx, [rdx + 0x10]
mov eax, ebx
sub eax, ebx
movsxd r8, eax
call fcn.0042a950
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 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 + 0x90]
call fcn.00413e20
lea rcx, [rsp + 0x90]
call fcn.004138d0
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 + 0x90]
call fcn.00413a00
cmp dword [rsp + 0x30], 0
jne 0x404a51
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 0x404a0d
call fcn.0042a7a0
lea rax, [0x00453630]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x90]
call fcn.00413bf0
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 0x404a4a
call fcn.0042a7a0
xor eax, eax
jmp 0x404b44
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, [0x0046c370]
call fcn.00424aa0
lea rdx, [rsp + 0x60]
mov rcx, qword [0x0046cca8]
call fcn.004045d0
mov rbx, rax
mov rax, qword [rax]
mov edx, dword [rbx + 0x10]
mov rcx, rbx
call qword [rax + 8]
mov rdx, qword [rbx + 8]
lea rcx, [0x0046c7f0]
call fcn.00424f00
nop
mov qword [rsp + 0x60], r13
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x68], r12
mov dword [rsp + 0x70], r12d
mov dword [rsp + 0x78], r12d
test rcx, rcx
je 0x404ac8
call fcn.0042a7a0
mov dword [0x0046c360], 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 0x404af5
call fcn.0042a7a0
lea rax, [0x00453630]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x90]
call fcn.00413bf0
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 0x404b32
call fcn.0042a7a0
lea rcx, [0x0046cc70]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov rcx, qword [rsp + 0x318]
call fcn.00452890
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]
add rsp, 0x338
ret