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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405585
mov eax, dword fs:[0]
push eax
mov eax, 0x108c
call fcn.00403790
mov eax, dword [0x409040]
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.004015e0
call fcn.00401db0
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 0x4026f1
lea ecx, [edi + edx]
mov dword [ebp - 0x18], ecx
jmp 0x40272a
jbe 0x40272a
mov eax, dword [ebp - 0x14]
sub eax, edx
cmp edi, eax
jbe 0x40270e
lea eax, [ebp - 0x107d]
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.004015e0
jmp 0x402727
mov eax, edi
sub eax, ecx
mov ecx, dword [ebp - 0x18]
push eax
push 0
push ecx
lea esi, [ecx + eax]
call sub.msvcrt.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.msvcrt.dll_memcpy
add esp, 0xc
call fcn.00401db0
movaps xmm0, xmmword [0x407260]
xor ecx, ecx
movups xmmword [ebp - 0x1098], xmm0
mov word [ebp - 0x1088], 1
nop dword [eax + eax]
mov al, byte [ebp - 0x1098]
xor byte [ebp + ecx - 0x1097], al
inc ecx
cmp ecx, 0x10
jb 0x402760
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 0x402798
sub ecx, edx
lea eax, [ebp - 0x1097]
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.00401420
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 0x40281d
call fcn.00401db0
push 4
call fcn.00403324
mov esi, eax
add esp, 4
test esi, esi
je 0x402809
mov dword [esi], vtable.ClaasLdrPe.0
jmp 0x40280b
xor esi, esi
call fcn.00401db0
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 0x402852
mov edx, dword [ebp - 0x34]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x402845
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4028ae
push ecx
push edx
call fcn.00403354
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 0x402891
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402887
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4028ae
push edx
push ecx
call fcn.00403354
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.004035b2
mov esp, ebp
pop ebp
ret
call fcn.00404510
int3