Function at 0x4092c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x30]
mov eax, ecx
mov ecx, dword [eax + 0x34]
push ebp
lea ebp, [eax + 0x34]
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], ebp
test ecx, ecx
je 0x40939b
lea eax, [esp + 0x3c]
cmp ebx, ecx
jb 0x4092ed
mov eax, ebp
mov esi, dword [eax]
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x30]
add edx, dword [eax + 0x2c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
push esi
push edi
sub edx, ecx
push eax
call fcn.00405900
sub dword [ebp], esi
add dword [esp + 0x40], esi
sub ebx, esi
add edi, esi
add esp, 0xc
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], edi
test ebx, ebx
je 0x40955d
mov eax, dword [esp + 0x10]
mov edx, dword [eax - 4]
lea ecx, [eax - 4]
mov eax, dword [edx + 0x4c]
mov dword [esp + 0x20], ecx
call eax
mov ebp, eax
mov edx, dword [ebp]
mov eax, dword [edx + 8]
mov ecx, ebp
mov dword [esp + 0x28], ebp
call eax
mov edx, dword [ebp]
mov esi, eax
mov eax, dword [edx + 0x18]
mov ecx, ebp
mov dword [esp + 0x14], esi
call eax
test al, al
je 0x409431
cmp ebx, esi
jb 0x409431
xor edx, edx
mov eax, ebx
div esi
mov edx, dword [ebp]
mov ecx, ebp
mov esi, eax
mov eax, dword [edx + 4]
call eax
mov ecx, eax
cmp ecx, 1
je 0x4093b8
test ecx, ecx
je 0x4093a1
lea eax, [ecx - 1]
test ecx, eax
jne 0x4093a1
and eax, edi
neg eax
sbb eax, eax
lea edx, [eax + 1]
jmp 0x4093ac
mov edi, dword [esp + 0x38]
jmp 0x40932d
xor edx, edx
mov eax, edi
div ecx
neg edx
sbb edx, edx
inc edx
mov dword [esp + 0x3c], 0
test edx, edx
je 0x4093c0
mov dword [esp + 0x3c], 1
cmp ecx, 1
je 0x4093f2
test ecx, ecx
je 0x4093dd
lea eax, [ecx - 1]
test ecx, eax
jne 0x4093dd
and eax, dword [esp + 0x34]
neg eax
sbb eax, eax
lea edx, [eax + 1]
jmp 0x4093ea
mov eax, dword [esp + 0x34]
xor edx, edx
div ecx
neg edx
sbb edx, edx
inc edx
test edx, edx
jne 0x4093f2
xor eax, eax
jmp 0x4093f7
mov eax, 1
movzx ecx, byte [esp + 0x3c]
mov edx, dword [ebp]
mov edx, dword [edx + 0x1c]
push esi
push edi
push dword [esp + 0x3c]
movzx eax, al
add ecx, ecx
or ecx, eax
push ecx
mov ecx, ebp
call edx
mov eax, esi
imul eax, dword [esp + 0x14]
add dword [esp + 0x34], eax
add edi, eax
sub ebx, eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], ebx
je 0x40955d
mov eax, dword [esp + 0x10]
mov esi, dword [eax + 0x2c]
xor edx, edx
mov eax, esi
div dword [esp + 0x14]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], eax
cmp ebx, esi
jb 0x409505
mov eax, esi
shr eax, 2
mov dword [esp + 0x18], eax
lea esp, [esp]
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x30]
mov edx, dword [ebp]
mov edx, dword [edx + 0x14]
push eax
push ecx
mov ecx, ebp
call edx
mov eax, dword [ebx + 0x30]
xor ebx, ebx
cmp dword [esp + 0x18], ebx
jbe 0x4094af
mov esi, dword [esp + 0x34]
mov edx, edi
mov edi, dword [esp + 0x18]
sub edx, eax
mov ecx, eax
sub esi, eax
mov ebx, edi
mov ebp, dword [edx + ecx]
xor ebp, dword [ecx]
add ecx, 4
dec edi
mov dword [esi + ecx - 4], ebp
jne 0x409494
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
lea ecx, [ebx*4]
mov edx, esi
sub edx, ecx
je 0x4094e7
mov esi, dword [esp + 0x34]
add esi, ecx
add edi, ecx
add eax, ecx
test edx, edx
je 0x4094df
mov ecx, edi
sub ecx, eax
sub esi, eax
mov edi, edx
mov dl, byte [ecx + eax]
xor dl, byte [eax]
inc eax
dec edi
mov byte [esi + eax - 1], dl
jne 0x4094d2
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
add dword [esp + 0x34], esi
sub eax, esi
add edi, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edi
cmp eax, esi
jae 0x409460
mov ebx, eax
test ebx, ebx
je 0x40955d
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x18]
call fcn.00408bb0
mov esi, eax
xor edx, edx
div dword [esp + 0x18]
add esp, 4
push eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x34]
sub ecx, esi
add ecx, dword [eax + 0x30]
mov eax, dword [ebp]
mov edx, dword [eax + 0x14]
push ecx
mov ecx, ebp
call edx
mov eax, dword [esp + 0x20]
mov edx, dword [eax + 0x34]
sub edx, esi
add edx, dword [eax + 0x30]
mov eax, dword [esp + 0x34]
push ebx
push edi
push eax
call fcn.00405900
mov ecx, dword [esp + 0x38]
add esp, 0xc
sub esi, ebx
mov dword [ecx], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc