Function at 0x408db0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
test esi, esi
mov dword [esp + 4], 0
jne 0x408dce
mov eax, 0xffffff9a
pop esi
add esp, 8
ret
push ebx
mov ebx, dword [esi + 0x9c]
test ebx, ebx
jne 0x408de4
pop ebx
mov eax, 0xffffff9a
pop esi
add esp, 8
ret
cmp dword [ebx], 0
jne 0x408df4
pop ebx
mov eax, 0xffffff9c
pop esi
add esp, 8
ret
test ecx, ecx
jne 0x408e00
pop ebx
xor eax, eax
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x5c]
cmp ecx, eax
mov dword [ebx + 0x14], ecx
jbe 0x408e1d
cmp dword [ebx + 0x8c], 0
jne 0x408e1d
mov dword [ebx + 0x14], eax
mov edx, dword [ebx + 0x58]
mov eax, dword [ebx + 8]
add eax, edx
cmp ecx, eax
jbe 0x408e35
cmp dword [ebx + 0x8c], 0
je 0x408e35
mov dword [ebx + 0x14], eax
cmp dword [ebx + 0x14], 0
push ebp
push edi
jbe 0x408fff
cmp dword [ebx + 8], 0
jne 0x408f1d
mov eax, dword [ebx + 0x58]
test eax, eax
jbe 0x408f1d
mov edi, 0x4000
cmp eax, edi
mov dword [esp + 0x14], edi
jae 0x408e69
mov dword [esp + 0x14], eax
mov edi, eax
mov ecx, dword [ebx + 0x88]
add ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x80]
mov eax, dword [ebx + 0x7c]
push 0
push ecx
mov ecx, dword [ebx + 0x70]
push edx
push eax
call ecx
add esp, 0x10
test eax, eax
jne 0x40900b
mov edx, dword [ebx]
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x7c]
push edi
push edx
mov edx, dword [ebx + 0x64]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, edi
jne 0x40900b
cmp dword [esi + 0xa0], 0
je 0x408f0f
xor ebp, ebp
test edi, edi
jbe 0x408f0f
add esi, 0xa4
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0xac]
mov edx, dword [ebx]
and eax, 0xfffd
lea edi, [edx + ebp]
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor byte [edi], dl
mov eax, dword [ebx]
movsx eax, byte [eax + ebp]
mov edi, dword [ecx + 0xb0]
call fcn.004081b0
mov ecx, dword [ebx]
mov byte [ecx + ebp], al
add ebp, 1
cmp ebp, dword [esp + 0x14]
jb 0x408ec4
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov edx, dword [ebx]
add dword [ebx + 0x3c], edi
sub dword [ebx + 0x58], edi
mov dword [ebx + 4], edx
mov dword [ebx + 8], edi
cmp dword [ebx + 0x84], 0
je 0x408f8e
cmp dword [ebx + 0x8c], 0
jne 0x408f8e
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx + 0x10]
lea ecx, [ebx + 4]
push ecx
mov dword [esp + 0x18], eax
call fcn.0040c460
mov ebp, eax
add esp, 4
test ebp, ebp
jl 0x408f56
cmp dword [ebx + 0x1c], 0
je 0x408f56
mov ebp, 0xfffffffd
mov edi, dword [ebx + 0x18]
sub edi, dword [esp + 0x14]
test esi, esi
mov eax, dword [ebx + 0x50]
jne 0x408f68
xor eax, eax
jmp 0x408f71
mov edx, edi
mov ecx, esi
call fcn.0040a240
sub dword [ebx + 0x5c], edi
add dword [esp + 0x10], edi
cmp ebp, 1
mov dword [ebx + 0x50], eax
je 0x408fff
test ebp, ebp
jne 0x409016
mov esi, dword [esp + 0x1c]
jmp 0x408ff5
mov eax, dword [ebx + 8]
test eax, eax
jne 0x408f9a
cmp dword [ebx + 0x58], eax
je 0x408fff
mov edi, dword [ebx + 0x14]
cmp edi, eax
jb 0x408fa3
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x408fc3
lea esp, [esp]
mov edx, dword [ebx + 4]
mov dl, byte [eax + edx]
mov ecx, dword [ebx + 0x10]
mov byte [eax + ecx], dl
add eax, 1
cmp eax, edi
jb 0x408fb0
mov ebp, dword [ebx + 0x10]
test ebp, ebp
mov eax, dword [ebx + 0x50]
jne 0x408fd1
xor eax, eax
jmp 0x408fda
mov edx, edi
mov ecx, ebp
call fcn.0040a240
sub dword [ebx + 0x5c], edi
sub dword [ebx + 8], edi
sub dword [ebx + 0x14], edi
add dword [ebx + 4], edi
add dword [ebx + 0x18], edi
add ebp, edi
add dword [esp + 0x10], edi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x10], ebp
cmp dword [ebx + 0x14], 0
ja 0x408e41
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 8
ret
pop edi
mov eax, ebp
pop ebp
pop ebx
pop esi
add esp, 8
ret