Function at 0x409020
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov edx, dword [esp + 0x5c]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x10], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0xc], eax
mov word [esp + 3], 0x6a62
mov byte [esp + 5], 0x11
mov eax, 0x27
nop
nop
movzx edi, byte [esp + eax - 0x24]
mov ebx, eax
or ebx, edi
and edi, eax
sub ebx, edi
add bl, 0xc8
mov byte [esp + eax - 0x24], bl
inc eax
cmp eax, 0x2a
jne 0x409050
mov dword [esp + 6], 0x989e9eb0
mov word [esp + 0xa], 0x979c
xor eax, eax
nop
nop
nop
nop
nop
mov edi, eax
not edi
movzx ecx, byte [esp + eax + 6]
lea ebp, [eax + 0x82]
mov ebx, 0x7d
sub ebx, eax
xor ebx, ebp
and ebx, ecx
xor ebx, ebp
add bl, 0xf0
mov byte [esp + eax + 6], bl
mov ecx, eax
or edi, 0xfffffffe
add edi, eax
xor eax, 0xfffffffe
or ecx, 1
and ecx, eax
lea eax, [ecx + edi]
add eax, 2
cmp eax, 6
jb 0x409080
mov dword [esp + 0x17], 0x967b3d3b
mov dword [esp + 0x1b], 0x9399af94
mov dword [esp + 0x1f], 0x886452aa
mov dword [esp + 0x23], 0xb68bb3b1
mov dword [esp + 0x27], 0x8681b38f
mov dword [esp + 0x2b], 0x8b4c7184
mov dword [esp + 0x2f], 0x7cbdbd81
mov dword [esp + 0x33], 0xb480b2b6
mov dword [esp + 0x37], 0xb8b6774d
mov dword [esp + 0x3b], 0x7f41beb7
mov byte [esp + 0x3f], 0x1e
mov ebx, 6
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [esp + ebx + 0x11]
lea eax, [ebx - 0x115f2800]
lea ecx, [edi + edi]
not ecx
add ecx, edi
and ecx, 0x7af4ab5e
mov ebp, edi
xor ebp, 0x7af4ab5e
or edi, 0xa1
and edi, ebp
or edi, ecx
mov ecx, ebx
and ecx, 0x5e
xor ecx, 0x1054235e
mov ebp, eax
xor ebp, 0x6aa0885e
or eax, 0x84005021
and eax, ebp
or eax, ecx
mov ecx, edi
and ecx, eax
add eax, edi
add ecx, ecx
sub eax, ecx
add al, 0xd0
mov byte [esp + ebx + 0x11], al
inc ebx
cmp ebx, 0x2f
jne 0x409120
mov ebp, dword [esp + 0x54]
add ebp, dword [esp + 0xc]
mov word [esp], 0xb2b3
mov byte [esp + 2], 0x40
xor eax, eax
mov ebx, dword [esp + 0x10]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax]
lea edi, [eax + 0x63d0a12e]
and edi, ecx
add ecx, eax
add ecx, 0x63d0a12e
add edi, edi
sub ecx, edi
add cl, 0x90
mov byte [esp + eax], cl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 3
jb 0x4091a0
movzx eax, byte [esp]
mov edi, ebp
test al, al
je 0x4091eb
lea ecx, [esp + 1]
mov edi, ebp
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x4091e0
mov byte [edi], 0
movzx eax, byte [ebx + 0x60]
test al, al
je 0x40920b
lea ecx, [ebx + 0x61]
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409200
mov byte [edi], 0
movzx eax, byte [esp + 0x17]
test al, al
je 0x40922b
lea ecx, [esp + 0x18]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409220
mov byte [edi], 0
movzx eax, byte [esi]
test al, al
je 0x40924b
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 0x409240
mov byte [edi], 0
movzx eax, byte [esp + 6]
test al, al
je 0x40926b
lea ecx, [esp + 7]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409260
mov byte [edi], 0
movzx eax, byte [edx]
test al, al
je 0x40928b
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 0x409280
mov byte [edi], 0
movzx eax, byte [esp + 3]
test al, al
je 0x4092ab
lea ecx, [esp + 4]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x4092a0
mov byte [edi], 0
sub edi, ebp
add dword [ebx + 0x80], edi
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret 0xc