Function at 0x409070
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov esi, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov dword [esp + 0x10], ecx
mov edi, dword [ecx + 0x80]
mov word [esp + 3], 0xb1b7
mov byte [esp + 5], 0xbc
mov ebx, 0x52fc0feb
mov ebp, 0x15
nop
movzx eax, byte [esp + ebx - 0x52fc0fe8]
mov ecx, ebp
and ecx, eax
not eax
or eax, ebp
add eax, ebx
or eax, ecx
mov ecx, eax
and ecx, 0x2f
xor eax, 0xaf
lea eax, [eax + ecx*2]
inc al
mov byte [esp + ebx - 0x52fc0fe8], al
inc ebx
dec ebp
cmp ebx, 0x52fc0fee
jne 0x4090a0
mov dword [esp + 6], 0xc6c0c4ea
mov word [esp + 0xa], 0xcdc6
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + ebx + 6]
mov ecx, ebx
xor ecx, 0x5d26bc77
mov ebp, ecx
or ebp, eax
and ecx, eax
lea eax, [ebp*2]
not eax
add eax, ebp
or eax, ecx
add al, 0xc0
mov byte [esp + ebx + 6], al
inc ebx
cmp ebx, 6
jne 0x4090f0
mov dword [esp + 0x17], 0xdd023a32
mov dword [esp + 0x1b], 0xd8e0d0dd
mov dword [esp + 0x1f], 0x23fde5d3
mov dword [esp + 0x23], 0x2d222c28
mov dword [esp + 0x27], 0x2d282426
mov dword [esp + 0x2b], 0x10d5fe2d
mov dword [esp + 0x2f], 0xf7343a28
mov dword [esp + 0x33], 0xf390d0f
mov dword [esp + 0x37], 0x33fc0e4
mov dword [esp + 0x3b], 0xc4e8013e
mov byte [esp + 0x3f], 0xa7
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + ebx + 0x17]
lea ebp, [ebx + 0xf7]
mov eax, 8
sub eax, ebx
xor eax, ebp
and eax, ecx
xor eax, ebp
add al, 0x48
mov byte [esp + ebx + 0x17], al
mov eax, ebx
and eax, 1
xor ebx, 1
lea ebx, [ebx + eax*2]
cmp ebx, 0x29
jb 0x409180
add edx, edi
mov dword [esp + 0xc], edx
mov word [esp], 0x393e
mov byte [esp + 2], 0xe5
xor eax, eax
mov ebx, 0x19aa513b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + ebx - 0x19aa513b]
mov edi, ebx
or edi, 0x6298d595
lea ebp, [eax + edi]
add ebp, 0xe655aec5
mov edi, eax
and edi, 2
xor edi, 0x1922002a
or edi, ebp
xor edi, ecx
mov ecx, edi
xor ecx, 0xafca5c4d
mov ebp, edi
and ebp, 0xc45088d8
xor ebp, 0x72bdf7b7
and ebp, ecx
mov ecx, ebp
and ecx, 0xf6fdfffd
mov edx, edi
and edx, 2
or ebp, 2
imul ebp, edx
xor edx, 2
imul edx, ecx
mov ecx, edi
xor ecx, 0xb2
add ecx, edx
add ecx, ebp
and edi, 1
xor ecx, 1
lea ecx, [ecx + edi*2]
mov byte [esp + ebx - 0x19aa513b], cl
dec eax
inc ebx
cmp eax, 0xfffffffd
jne 0x4091d0
movzx eax, byte [esp]
mov ecx, dword [esp + 0xc]
mov edi, ecx
test al, al
je 0x40926b
lea ebx, [esp + 1]
mov edi, ecx
mov byte [edi], al
inc edi
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x409260
mov byte [edi], 0
mov ecx, dword [esp + 0x10]
movzx eax, byte [ecx + 0x60]
test al, al
mov edx, dword [esp + 0x5c]
je 0x40929b
lea ebx, [ecx + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x409290
mov byte [edi], 0
movzx eax, byte [esp + 0x17]
test al, al
je 0x4092bb
lea ebx, [esp + 0x18]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x4092b0
mov byte [edi], 0
movzx eax, byte [esi]
test al, al
je 0x4092db
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [esi]
inc esi
test al, al
jne 0x4092d0
mov byte [edi], 0
movzx eax, byte [esp + 6]
test al, al
je 0x4092fb
lea esi, [esp + 7]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [esi]
inc esi
test al, al
jne 0x4092f0
mov byte [edi], 0
movzx eax, byte [edx]
test al, al
je 0x40931b
inc edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [edx]
inc edx
test al, al
jne 0x409310
mov byte [edi], 0
movzx eax, byte [esp + 3]
test al, al
je 0x40933b
lea edx, [esp + 4]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [edx]
inc edx
test al, al
jne 0x409330
mov byte [edi], 0
sub edi, dword [esp + 0xc]
add dword [ecx + 0x80], edi
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret 0xc