Function at 0x40b240
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x108
mov esi, dword [esp + 0x11c]
lea eax, [esi + 0x8f12]
push 0x90
push 8
push eax
call fcn.0040cd70
add esp, 0xc
lea eax, [esi + 0x8fa2]
push 0x70
push 9
push eax
call fcn.0040cd70
add esp, 0xc
mov dword [esi + 0x9012], 0x7070707
mov dword [esi + 0x9016], 0x7070707
mov dword [esi + 0x901a], 0x7070707
mov dword [esi + 0x901e], 0x7070707
mov dword [esi + 0x9022], 0x7070707
mov dword [esi + 0x9026], 0x7070707
mov dword [esi + 0x902e], 0x8080808
mov dword [esi + 0x902a], 0x8080808
mov dword [esi + 0x9032], 0x5050505
mov dword [esi + 0x9036], 0x5050505
mov dword [esi + 0x903a], 0x5050505
mov dword [esi + 0x903e], 0x5050505
mov dword [esi + 0x9042], 0x5050505
mov dword [esi + 0x9046], 0x5050505
mov dword [esi + 0x904a], 0x5050505
mov dword [esi + 0x904e], 0x5050505
mov eax, esp
push 0x84
push 0
push eax
call fcn.0040cd70
add esp, 0xc
xor eax, eax
nop
nop
movzx ecx, byte [esi + eax + 0x8f12]
inc dword [esp + ecx*4]
movzx ecx, byte [esi + eax + 0x8f13]
inc dword [esp + ecx*4]
movzx ecx, byte [esi + eax + 0x8f14]
inc dword [esp + ecx*4]
movzx ecx, byte [esi + eax + 0x8f15]
inc dword [esp + ecx*4]
add eax, 4
cmp eax, 0x120
jne 0x40b330
mov dword [esp + 0x88], 0
mov eax, dword [esp + 4]
add eax, eax
mov dword [esp + 0x8c], eax
add eax, dword [esp + 8]
add eax, eax
mov dword [esp + 0x90], eax
add eax, dword [esp + 0xc]
add eax, eax
mov dword [esp + 0x94], eax
add eax, dword [esp + 0x10]
add eax, eax
mov dword [esp + 0x98], eax
add eax, dword [esp + 0x14]
add eax, eax
mov dword [esp + 0x9c], eax
add eax, dword [esp + 0x18]
add eax, eax
mov dword [esp + 0xa0], eax
add eax, dword [esp + 0x1c]
add eax, eax
mov dword [esp + 0xa4], eax
add eax, dword [esp + 0x20]
add eax, eax
mov dword [esp + 0xa8], eax
add eax, dword [esp + 0x24]
add eax, eax
mov dword [esp + 0xac], eax
add eax, dword [esp + 0x28]
add eax, eax
mov dword [esp + 0xb0], eax
add eax, dword [esp + 0x2c]
add eax, eax
mov dword [esp + 0xb4], eax
add eax, dword [esp + 0x30]
add eax, eax
mov dword [esp + 0xb8], eax
add eax, dword [esp + 0x34]
add eax, eax
mov dword [esp + 0xbc], eax
add eax, dword [esp + 0x38]
add eax, eax
mov dword [esp + 0xc0], eax
xor eax, eax
jmp 0x40b44b
mov esi, dword [esp + 0x11c]
mov word [esi + eax*2 + 0x8852], bx
inc eax
cmp eax, 0x120
je 0x40b4cc
movzx edx, byte [esi + eax + 0x8f12]
test edx, edx
je 0x40b43f
mov esi, dword [esp + edx*4 + 0x84]
lea ecx, [esi + 1]
mov dword [esp + edx*4 + 0x84], ecx
xor ebx, ebx
cmp edx, 1
je 0x40b4b0
mov ebp, edx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, esi
xor ebx, 0x7ffffffe
mov ecx, esi
or ecx, 1
and ecx, ebx
mov ebx, esi
shr ebx, 1
shl edi, 2
add ecx, ecx
or ecx, edi
mov edi, ebx
xor edi, 0xfffffffe
or ebx, 1
and ebx, edi
or ebx, ecx
shr esi, 2
mov edi, ebx
add ebp, 0xfffffffe
jne 0x40b480
test dl, 1
je 0x40b430
add ebx, ebx
mov ecx, esi
xor ecx, 0xfffffffe
or esi, 1
and esi, ecx
or ebx, esi
jmp 0x40b430
push 0x84
push 0
lea eax, [esp + 8]
push eax
call fcn.0040cd70
add esp, 0xc
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esi + eax + 0x9032]
inc dword [esp + ecx*4]
movzx ecx, byte [esi + eax + 0x9033]
inc dword [esp + ecx*4]
movzx ecx, byte [esi + eax + 0x9034]
inc dword [esp + ecx*4]
movzx ecx, byte [esi + eax + 0x9035]
inc dword [esp + ecx*4]
add eax, 4
cmp eax, 0x20
jne 0x40b4f0
mov dword [esp + 0x88], 0
mov eax, dword [esp + 4]
add eax, eax
mov dword [esp + 0x8c], eax
add eax, dword [esp + 8]
add eax, eax
mov dword [esp + 0x90], eax
add eax, dword [esp + 0xc]
add eax, eax
mov dword [esp + 0x94], eax
add eax, dword [esp + 0x10]
add eax, eax
mov dword [esp + 0x98], eax
add eax, dword [esp + 0x14]
add eax, eax
mov dword [esp + 0x9c], eax
add eax, dword [esp + 0x18]
add eax, eax
mov dword [esp + 0xa0], eax
add eax, dword [esp + 0x1c]
add eax, eax
mov dword [esp + 0xa4], eax
add eax, dword [esp + 0x20]
add eax, eax
mov dword [esp + 0xa8], eax
add eax, dword [esp + 0x24]
add eax, eax
mov dword [esp + 0xac], eax
add eax, dword [esp + 0x28]
add eax, eax
mov dword [esp + 0xb0], eax
add eax, dword [esp + 0x2c]
add eax, eax
mov dword [esp + 0xb4], eax
add eax, dword [esp + 0x30]
add eax, eax
mov dword [esp + 0xb8], eax
add eax, dword [esp + 0x34]
add eax, eax
mov dword [esp + 0xbc], eax
add eax, dword [esp + 0x38]
add eax, eax
mov dword [esp + 0xc0], eax
xor eax, eax
jmp 0x40b605
mov esi, dword [esp + 0x11c]
mov word [esi + eax*2 + 0x8a92], di
inc eax
cmp eax, 0x20
je 0x40b678
movzx edx, byte [esi + eax + 0x9032]
test edx, edx
je 0x40b5ff
mov ecx, dword [esp + edx*4 + 0x84]
lea esi, [ecx + 1]
mov dword [esp + edx*4 + 0x84], esi
xor edi, edi
cmp edx, 1
je 0x40b660
mov ebx, edx
and ebx, 0xfffffffe
xor ebp, ebp
mov edi, ecx
xor edi, 0x7ffffffe
mov esi, ecx
or esi, 1
and esi, edi
mov edi, ecx
shr edi, 1
shl ebp, 2
add esi, esi
or esi, ebp
mov ebp, edi
xor ebp, 0xfffffffe
or edi, 1
and edi, ebp
or edi, esi
shr ecx, 2
mov ebp, edi
add ebx, 0xfffffffe
jne 0x40b630
test dl, 1
je 0x40b5f0
add edi, edi
mov edx, ecx
xor edx, 0xfffffffe
or ecx, 1
and ecx, edx
or edi, ecx
jmp 0x40b5f0
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
bts eax, ecx
mov dword [esi + 0x48], eax
add ecx, 2
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40b6b1
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret
shr eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40b68f
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x40b6a0
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40b6a0