Function at 0x402070
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x114
mov eax, dword [esp + 0x128]
mov dword [esp], eax
mov eax, 2
nop dword [eax]
movzx ebx, byte [ecx + eax - 2]
test bl, bl
je 0x4020d8
mov byte [esp + eax + 0x12], bl
movzx ebx, byte [ecx + eax - 1]
test bl, bl
je 0x4020dd
mov byte [esp + eax + 0x13], bl
movzx ebx, byte [ecx + eax]
test bl, bl
je 0x4020de
mov byte [esp + eax + 0x14], bl
add eax, 3
cmp eax, 0x101
jne 0x402090
lea esi, [esp + 0x113]
mov byte [esp + 0x113], 0
xor ecx, ecx
mov eax, 0xff
jmp 0x402105
add eax, 0xfffffffe
jmp 0x4020de
dec eax
lea esi, [esp + eax + 0x14]
mov byte [esp + eax + 0x14], 0
lea ecx, [eax - 0x101]
cmp ecx, 0xfffffffd
ja 0x4020fc
mov byte [esi], 0x40
mov ecx, 1
jmp 0x402105
xor ecx, ecx
cmp eax, 0x100
je 0x402109
mov byte [esi + ecx], 0
mov dword [esp + 8], ecx
lea esi, [esp + ecx + 0x14]
mov dword [esp + 0xc], eax
add esi, eax
mov ebp, 1
xor ebx, ebx
mov eax, edx
mov dword [esp + 4], esi
nop word cs:[eax + eax]
nop
mov ecx, eax
and ecx, 0xf
mov edx, ecx
or dl, 0x30
mov dh, cl
add dh, 0x57
cmp ecx, 0xa
movzx ecx, dl
movzx edx, dh
cmovb edx, ecx
mov byte [esi + ebp - 1], dl
cmp eax, 0x10
mov ecx, dword [esp]
sbb ecx, 0
jb 0x4021b2
mov ecx, eax
shr ecx, 4
mov edx, dword [esp]
mov edi, edx
shld edi, eax, 0x18
mov esi, edx
shr esi, 8
and ecx, 0xf
mov dword [esp + 0x10], eax
mov eax, ecx
or al, 0x30
mov ah, cl
add ah, 0x57
cmp ecx, 0xa
movzx ecx, al
movzx eax, ah
cmovb eax, ecx
mov ecx, dword [esp + 4]
mov byte [ecx + ebp], al
add ebp, 2
inc ebx
mov eax, 0xff
cmp eax, dword [esp + 0x10]
mov eax, 0
sbb eax, edx
mov eax, edi
mov dword [esp], esi
mov esi, dword [esp + 4]
jb 0x402130
dec ebp
jmp 0x4021bf
mov eax, ebp
dec eax
je 0x402247
mov ebx, ebp
shr ebx, 1
mov dword [esp], ebp
add ebp, esi
xor esi, esi
cmp ebx, 1
je 0x40221b
and ebx, 0x7ffffffe
mov eax, dword [esp + 0xc]
add eax, dword [esp + 8]
lea ecx, [esp + eax + 0x14]
lea eax, [esp + eax + 0x15]
mov edx, dword [esp]
lea ecx, [edx + ecx - 1]
xor esi, esi
nop word [eax + eax]
movzx edx, byte [eax + esi - 1]
mov dh, byte [ecx]
mov byte [eax + esi - 1], dh
mov byte [ecx], dl
movzx edx, byte [eax + esi]
mov edi, esi
xor edi, 0xfffffffe
mov dh, byte [ebp + edi]
mov byte [eax + esi], dh
mov byte [ebp + edi], dl
add esi, 2
add ecx, 0xfffffffe
cmp ebx, esi
jne 0x4021f0
mov edx, dword [esp]
test dl, 2
jne 0x402229
mov esi, dword [esp + 4]
jmp 0x40224c
mov edx, dword [esp + 4]
movzx eax, byte [edx + esi]
mov ecx, esi
not ecx
mov ah, byte [ebp + ecx]
mov byte [edx + esi], ah
mov esi, edx
mov edx, dword [esp]
mov byte [ebp + ecx], al
jmp 0x40224c
mov edx, 1
mov byte [esi + edx], 0
push 0x24
push 1
call sub.MSVCR70.dll_calloc
add esp, 8
test eax, eax
je 0x4022b1
xor edi, edi
nop word cs:[eax + eax]
nop dword [eax]
cmp byte [esp + edi + 0x14], 0
lea edi, [edi + 1]
jne 0x402270
test edi, edi
je 0x4022a2
mov ebx, eax
push edi
call sub.MSVCR70.dll_malloc
add esp, 4
test eax, eax
je 0x4022b1
mov esi, eax
lea eax, [esp + 0x14]
push edi
push eax
push esi
call sub.MSVCR70.dll_memcpy
add esp, 0xc
mov eax, ebx
jmp 0x4022a4
xor esi, esi
mov dword [eax], esi
add esp, 0x114
pop esi
pop edi
pop ebx
pop ebp
ret
push str.Out_of_memory_
call fcn.00410c90
int3