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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403e05
mov eax, dword fs:[0]
push eax
mov eax, 0x108c
call fcn.004031d0
mov eax, dword [0x407040]
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
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x107d]
mov dword [ebp - 4], 0
push eax
push 0x400
lea ecx, [ebp - 0x1c]
call fcn.00401460
call fcn.00401b10
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 dword [ebp - 0x1084], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp - 0x18]
mov edi, eax
mov edx, dword [ebp - 0x1c]
sub ecx, edx
cmp edi, ecx
jae 0x402291
lea ecx, [edi + edx]
mov dword [ebp - 0x18], ecx
jmp 0x4022ca
jbe 0x4022ca
mov eax, dword [ebp - 0x14]
sub eax, edx
cmp edi, eax
jbe 0x4022ae
lea eax, [ebp - 0x107d]
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.00401460
jmp 0x4022c7
mov eax, edi
sub eax, ecx
mov ecx, dword [ebp - 0x18]
push eax
push 0
push ecx
lea esi, [ecx + eax]
call sub.ucrtbase.dll_memset
add esp, 0xc
mov dword [ebp - 0x18], esi
mov edx, dword [ebp - 0x1c]
push edi
push dword [ebp - 0x1084]
push edx
call sub.ucrtbase.dll_memcpy
add esp, 0xc
call fcn.00401b10
movaps xmm0, xmmword [0x405270]
xor ecx, ecx
movups xmmword [ebp - 0x1098], xmm0
mov word [ebp - 0x1088], 0x34
nop dword [eax + eax]
mov al, byte [ebp - 0x1098]
xor byte [ebp + ecx - 0x1097], al
inc ecx
cmp ecx, 0x10
jb 0x402300
xorps xmm0, xmm0
mov byte [ebp - 0x1087], 0
lea ecx, [ebp - 0x1097]
mov dword [ebp - 0x24], 0
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x20], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402338
sub ecx, edx
lea eax, [ebp - 0x1097]
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.004013c0
cmp dword [ebp - 0x20], 0xf
lea eax, [ebp - 0x34]
push dword [ebp - 0x24]
cmova eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x107c]
push eax
mov byte [ebp - 4], 1
call fcn.00401180
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
sub eax, ecx
push eax
push ecx
push ecx
lea ecx, [ebp - 0x107c]
call fcn.00401010
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x4023bd
call fcn.00401b10
push 4
call fcn.00402d5c
mov esi, eax
add esp, 4
test esi, esi
je 0x4023a9
mov dword [esi], vtable.ClaasLdrPe.0
jmp 0x4023ab
xor esi, esi
call fcn.00401b10
mov eax, dword [esi]
mov ecx, esi
push dword [ebp - 0x1c]
call dword [eax + 0x10]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
cmp eax, 0xf
jbe 0x4023f2
mov edx, dword [ebp - 0x34]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x4023e5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40244e
push ecx
push edx
call fcn.00402d8c
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
test ecx, ecx
je 0x402431
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402427
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40244e
push edx
push ecx
call fcn.00402d8c
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.00402feb
mov esp, ebp
pop ebp
ret
call sub.ucrtbase.dll__invalid_parameter_noinfo_noreturn
int3