Function at 0x409670
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov edi, dword [esp + 0x70]
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp + 8], 0xd13
mov byte [esp + 0xa], 6
mov word [esp + 0xb], 0
mov ebp, 0xc1
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [esp + ebp - 0xb9]
mov ecx, ebx
and ecx, ebp
mov eax, ecx
or al, 0xfd
inc al
mov edx, ecx
and dl, 0xcd
mul dl
mov edx, eax
add dl, bl
mov eax, ecx
shr al, 1
and al, 1
or cl, 2
mul cl
add al, al
sub dl, al
movzx eax, dl
add eax, ebp
add al, 0x3b
mov byte [esp + ebp - 0xb9], al
inc ebp
cmp ebp, 0xc6
jne 0x4096b0
mov dword [esp + 0x10], 0x66986472
mov word [esp + 0x14], 0x9d96
mov dword [esp + 0x16], 0
mov byte [esp + 0x1a], 0
mov eax, 0xe4
mov edx, 0x1b
nop
nop
nop
nop
nop
nop
nop
mov ebx, edx
and ebx, 0x12
mov ecx, eax
and ecx, 0xcd
or ecx, ebx
xor cl, byte [esp + eax - 0xd4]
xor cl, 0x32
add cl, 0x8c
mov byte [esp + eax - 0xd4], cl
inc eax
dec edx
cmp eax, 0xef
jne 0x409720
mov dword [esp + 0x24], 0xdbe5e3
mov dword [esp + 0x28], 0xb35070e
mov dword [esp + 0x2c], 0x12d2c800
mov dword [esp + 0x30], 0x181b1b1d
mov dword [esp + 0x34], 0x10151b17
mov dword [esp + 0x38], 0x23e2c91e
mov dword [esp + 0x3c], 0xa6191515
mov dword [esp + 0x40], 0x5e6e585c
mov dword [esp + 0x44], 0x52609fb1
mov dword [esp + 0x48], 0x97bd546f
mov byte [esp + 0x4c], 0xf4
mov dword [esp + 0x4d], 0
mov word [esp + 0x51], 0
xor eax, eax
mov ebp, dword [esp + 0x68]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, eax
and edx, 0x25
mov ebx, eax
and ebx, 0x1a
mov ecx, eax
xor ecx, 0xa5
add ecx, edx
sub ecx, ebx
add ecx, eax
xor cl, byte [esp + eax + 0x24]
add cl, 0xc7
mov byte [esp + eax + 0x24], cl
inc eax
cmp eax, 0x2f
jne 0x4097c0
add ebp, dword [esp + 0x1c]
mov word [esp], 0xc0c3
mov byte [esp + 2], 0x9e
mov dword [esp + 3], 0
mov byte [esp + 7], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax]
lea edx, [eax - 0x1dc95fdb]
xor edx, ecx
add edx, 0x94eedf46
mov ecx, edx
xor ecx, 0x7e
mov ebx, edx
or ebx, 1
and ebx, ecx
xor edx, 1
lea ecx, [edx + ebx*2]
mov byte [esp + eax], cl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 8
jb 0x409810
movzx ecx, byte [esp]
mov eax, ebp
test cl, cl
je 0x40986b
lea edx, [esp + 1]
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x409860
mov byte [eax], 0
mov ebx, dword [esp + 0x20]
movzx ecx, byte [ebx + 0x60]
test cl, cl
je 0x40988b
lea edx, [ebx + 0x61]
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x409880
mov byte [eax], 0
movzx ecx, byte [esp + 0x24]
test cl, cl
je 0x4098ab
lea edx, [esp + 0x25]
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x4098a0
mov byte [eax], 0
movzx ecx, byte [esi]
test cl, cl
je 0x4098cb
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x4098c0
mov byte [eax], 0
movzx ecx, byte [esp + 0x10]
test cl, cl
je 0x4098eb
lea edx, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x4098e0
mov byte [eax], 0
movzx ecx, byte [edi]
test cl, cl
je 0x40990b
inc edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edi]
inc edi
test cl, cl
jne 0x409900
mov byte [eax], 0
movzx ecx, byte [esp + 8]
test cl, cl
je 0x40992b
lea edx, [esp + 9]
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x409920
mov byte [eax], 0
sub eax, ebp
add dword [ebx + 0x80], eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc