Function at 0x465120
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, edx
push esi
mov esi, ecx
mov dword [ebp - 8], ebx
push edi
mov edx, dword [ebx + 8]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x10], edx
test edx, edx
jne 0x465198
cmp dword [ebp + 0xc], edx
je 0x465165
mov eax, dword [ebx + 0x10]
mov byte [ebx + 4], 6
mov dword [ebx + 8], 0x40
push 0x100
mov eax, dword [eax]
call eax
add esp, 4
mov dword [ebx], eax
test eax, eax
jne 0x46516e
mov dword [ebx + 8], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100
push 0
push eax
call fcn.00437b80
mov edx, dword [ebp + 8]
add esp, 0xc
mov ecx, esi
call fcn.00465430
mov ecx, dword [ebx + 8]
lea esi, [ebx + 0xc]
mov edx, eax
dec ecx
and edx, ecx
jmp 0x4653dd
mov eax, dword [ebp + 8]
mov ecx, eax
mov esi, dword [esi + 0x1f0]
mov dword [ebp - 0x14], esi
mov al, byte [eax]
mov byte [ebp - 1], al
test al, al
je 0x4651c7
nop
imul esi, esi, 0xf4243
lea ecx, [ecx + 1]
movzx eax, al
xor esi, eax
mov al, byte [ecx]
test al, al
jne 0x4651b0
mov dword [ebp - 0x14], esi
lea eax, [edx - 1]
xor bl, bl
mov edx, esi
and edx, eax
mov eax, dword [ebp - 8]
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
cmp dword [esi + edx*4], 0
je 0x46523f
mov edi, edi
mov edi, dword [esi + edx*4]
mov cl, byte [ebp - 1]
mov eax, dword [edi]
cmp cl, byte [eax]
jne 0x465205
mov esi, dword [ebp + 8]
sub esi, eax
test cl, cl
je 0x46533e
mov cl, byte [esi + eax + 1]
inc eax
cmp cl, byte [eax]
je 0x4651f1
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x10]
test bl, bl
jne 0x465228
mov ecx, dword [ebp - 8]
lea eax, [edi - 1]
mov ebx, eax
shr eax, 2
not ebx
and ebx, dword [ebp - 0x14]
movzx ecx, byte [ecx + 4]
dec ecx
shr ebx, cl
and bl, al
or bl, 1
movzx ecx, bl
cmp edx, ecx
jae 0x465237
mov eax, edi
sub eax, ecx
add edx, eax
jmp 0x465239
sub edx, ecx
cmp dword [esi + edx*4], 0
jne 0x4651e0
cmp dword [ebp + 0xc], 0
je 0x465165
mov ebx, dword [ebp - 8]
lea edi, [ebx + 0xc]
mov dword [ebp - 0x20], edi
mov esi, edi
mov al, byte [ebx + 4]
movzx ecx, al
mov byte [ebp - 1], al
dec ecx
mov eax, dword [edi]
shr eax, cl
test eax, eax
je 0x4653dd
mov al, byte [ebp - 1]
inc al
movzx esi, al
mov byte [ebp - 1], al
mov ecx, esi
mov eax, 1
shl eax, cl
mov dword [ebp - 0x10], eax
lea ebx, [eax - 1]
lea edi, [eax*4]
mov dword [ebp - 0x2c], ebx
mov eax, dword [ebp - 8]
push edi
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
call eax
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
je 0x465165
push edi
mov edi, eax
push 0
push edi
call fcn.00437b80
lea eax, [esi - 1]
xor ecx, ecx
mov esi, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
cmp dword [esi + 8], ecx
jbe 0x46536e
lea esp, [esp]
mov eax, dword [esi]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x465361
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
mov edi, dword [eax + 0x1f0]
mov al, byte [ecx]
test al, al
je 0x465305
imul edi, edi, 0xf4243
lea ecx, [ecx + 1]
movzx eax, al
xor edi, eax
mov al, byte [ecx]
test al, al
jne 0x4652f1
mov ecx, dword [ebp - 0xc]
mov edx, edi
and edx, ebx
xor al, al
cmp dword [ecx + edx*4], 0
je 0x465355
test al, al
jne 0x46532c
mov ecx, dword [ebp - 0x1c]
mov eax, ebx
not eax
and eax, edi
shr eax, cl
mov ecx, ebx
shr ecx, 2
and al, cl
or al, 1
movzx ecx, al
mov esi, edx
sub esi, ecx
cmp edx, ecx
jae 0x465347
mov edx, dword [ebp - 0x10]
add edx, esi
jmp 0x465349
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, esi
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + edx*4], 0
jne 0x465314
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
mov dword [edi + edx*4], eax
inc ecx
mov dword [ebp - 0x18], ecx
cmp ecx, dword [esi + 8]
jb 0x4652d0
mov eax, dword [esi + 0x10]
push dword [esi]
mov eax, dword [eax + 8]
call eax
mov ecx, dword [ebp - 0x14]
add esp, 4
mov al, byte [ebp - 1]
mov edx, ecx
and edx, ebx
mov byte [esi + 4], al
mov eax, dword [ebp - 0x10]
xor bl, bl
mov dword [esi], edi
mov dword [esi + 8], eax
cmp dword [edi + edx*4], 0
mov esi, dword [ebp - 0x20]
je 0x4653da
mov esi, dword [ebp - 0x2c]
mov edi, edi
test bl, bl
jne 0x4653bc
mov ebx, esi
mov eax, esi
not ebx
shr eax, 2
and ebx, ecx
mov ecx, dword [ebp - 0x1c]
shr ebx, cl
and bl, al
mov eax, dword [ebp - 0x10]
or bl, 1
movzx ecx, bl
cmp edx, ecx
jae 0x4653c9
sub eax, ecx
add edx, eax
jmp 0x4653cb
sub edx, ecx
cmp dword [edi + edx*4], 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
jne 0x4653a0
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 8]
mov eax, dword [ebx + 0x10]
lea edi, [edx*4]
push dword [ebp + 0xc]
mov eax, dword [eax]
call eax
mov ecx, dword [ebx]
add esp, 4
mov dword [edi + ecx], eax
mov eax, dword [ebx]
mov eax, dword [edi + eax]
test eax, eax
je 0x465165
push dword [ebp + 0xc]
push 0
push eax
call fcn.00437b80
mov ecx, dword [ebx]
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [edi + ecx]
mov dword [ecx], eax
mov eax, dword [ebx]
inc dword [esi]
mov eax, dword [edi + eax]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret