Function at 0x402d80
Capabilities:
Encode data using xor
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4068e5
mov eax, dword fs:[0]
push eax
mov eax, 0x1090
call fcn.00404850
mov eax, dword [0x40b040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
movups xmmword [ebp - 0x24], xmm0
push 8
mov dword [ebp - 4], 0
movups xmmword [ebp - 0x24], xmm0
call fcn.00404120
lea ecx, [ebp - 0x24]
add esp, 4
mov dword [eax + 4], 0
mov dword [ebp - 0x24], eax
mov dword [eax], ecx
push 0x400
mov dword [ebp - 4], 1
call fcn.00402ca0
call fcn.00402050
push 0xa
push 2
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
lea ecx, [ebp - 0x24]
push esi
call fcn.00402ca0
push esi
push edi
push dword [ebp - 0x20]
call sub.ucrtbase.dll_memcpy
add esp, 0xc
call fcn.00402050
movaps xmm0, xmmword [0x408680]
xor ecx, ecx
movups xmmword [ebp - 0x109c], xmm0
mov word [ebp - 0x108c], 1
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x109b]
xor al, byte [ebp - 0x109c]
mov byte [ebp + ecx - 0x109b], al
inc ecx
cmp ecx, 0x10
jb 0x402e50
xorps xmm0, xmm0
mov byte [ebp - 0x108b], 0
lea ecx, [ebp - 0x109b]
mov dword [ebp - 0x40], 0
movups xmmword [ebp - 0x3c], xmm0
mov dword [ebp - 0x2c], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x28], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402e96
sub ecx, edx
lea eax, [ebp - 0x109b]
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00401470
cmp dword [ebp - 0x28], 0xf
lea eax, [ebp - 0x3c]
push dword [ebp - 0x2c]
cmova eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x1088]
push eax
mov byte [ebp - 4], 2
call fcn.00401200
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
sub eax, ecx
push eax
push ecx
push ecx
lea ecx, [ebp - 0x1088]
call fcn.00401090
cmp dword [ebp - 0x20], 0
je 0x402f17
call fcn.00402050
push 4
call fcn.00404120
mov esi, eax
add esp, 4
test esi, esi
je 0x402f06
mov dword [esi], vtable.ClaasLdrPe.0
jmp 0x402f08
xor esi, esi
call fcn.00402050
mov eax, dword [esi]
mov ecx, esi
push dword [ebp - 0x20]
call dword [eax + 0x10]
lea ecx, [ebp - 0x40]
call fcn.00401ce0
push 3
lea ecx, [ebp - 0x14]
call fcn.00403960
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x402f4d
mov eax, dword [ecx + 4]
mov dword [ecx + 4], 0
test eax, eax
je 0x402f4d
nop
mov dword [eax], 0
mov eax, dword [eax + 4]
test eax, eax
jne 0x402f40
lea ecx, [ebp - 0x14]
call fcn.00403a10
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x40303e
mov edi, dword [ebp - 0x18]
sub edi, esi
cmp edi, 0x1000
jb 0x40301f
mov eax, dword [esi - 4]
add edi, 0x27
cmp dword [esi - 8], 0xfafafafa
mov dword [ebp - 0x14], eax
je 0x402fca
push str.invalid_argument
push 0x40823c
push 0
push 0xb2
push 0x408240
push 2
call fcn.00405a60
add esp, 0x18
cmp eax, 1
jne 0x402fa9
int3
push 0
push 0xb2
push str.C:Program_FilesMicrosoft_Visual_Studio2022CommunityVCToolsMSVC14.41.34120includexmemory
push 0x40836c
push str._invalid_argument_
call fcn.00405990
mov eax, dword [ebp - 0x14]
add esp, 0x14
sub esi, eax
cmp esi, 8
jb 0x402fd6
cmp esi, 0x27
jbe 0x40301d
push str.invalid_argument
push 0x40823c
push 0
push 0xbc
push 0x408240
push 2
call fcn.00405a60
add esp, 0x18
cmp eax, 1
jne 0x402ffc
int3
push 0
push 0xbc
push str.C:Program_FilesMicrosoft_Visual_Studio2022CommunityVCToolsMSVC14.41.34120includexmemory
push 0x40836c
push str._invalid_argument_
call fcn.00405990
mov eax, dword [ebp - 0x14]
add esp, 0x14
mov esi, eax
push edi
push esi
call fcn.00404100
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x24]
push 8
push eax
mov dword [ebp - 0x24], 0
call fcn.00404100
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404670
mov esp, ebp
pop ebp
ret