Function at 0x4049cb
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x98]
mov ebx, ecx
push eax
lea ecx, [esp + 0x64]
call fcn.004019cc
cmp dword [esp + 0x74], 8
lea edx, [esp + 0x60]
push dword [esp + 0x70]
cmovae edx, dword [esp + 0x64]
call fcn.00404943
push 0
push 1
lea ecx, [esp + 0x68]
mov esi, eax
call fcn.004023dd
xor edx, edx
mov ecx, 0x98967f
mov eax, esi
div ecx
inc edx
mov dword [0x43b3e0], edx
call fcn.00404910
mov eax, dword [esp + 0x90]
lea ecx, [esp + 0x80]
xor edx, edx
cmp dword [esp + 0x94], 8
push 0xf
cmovae ecx, dword [esp + 0x84]
pop ebp
push dword [esp + 0x80]
mov dword [esp + 0x48], ebp
lea eax, [ecx + eax*2]
mov dword [esp + 0x44], edx
lea ecx, [esp + 0x84]
mov byte [esp + 0x34], dl
cmovae ecx, dword [esp + 0x84]
push eax
push ecx
lea ecx, [esp + 0x6c]
mov dword [esp + 0x80], ebp
mov dword [esp + 0x7c], edx
mov byte [esp + 0x6c], dl
call fcn.00405031
cmp dword [esp + 0x44], 0x10
lea eax, [esp + 0x30]
push 0xffffffffffffffff
cmovae eax, dword [esp + 0x34]
lea ecx, [esp + 0x34]
sub ecx, eax
xor esi, esi
push esi
lea eax, [esp + 0x68]
push eax
push esi
push ecx
lea ecx, [esp + 0x44]
call fcn.00404cce
push esi
push 1
lea ecx, [esp + 0x68]
call fcn.00401d41
cmp dword [esp + 0x44], 0x10
lea eax, [esp + 0x30]
lea ecx, [esp + 0x60]
cmovae eax, dword [esp + 0x30]
push eax
call fcn.0040199f
lea edx, [esp + 0x60]
lea ecx, [esp + 0x48]
call fcn.00402efc
push esi
push 1
lea ecx, [esp + 0x68]
call fcn.00401d41
push dword [esp + 0x58]
call fcn.0040f04b
pop ecx
mov ecx, dword [esp + 0x58]
xor edi, edi
mov ebp, eax
test ecx, ecx
je 0x404b22
cmp dword [esp + 0x5c], 0x10
lea esi, [esp + 0x48]
cmovae esi, dword [esp + 0x48]
call fcn.00404910
xor al, byte [esi + edi]
mov byte [edi + ebp], al
inc edi
mov ecx, dword [esp + 0x58]
cmp edi, ecx
jb 0x404b00
push dword [esp + 0x80]
and dword [esp + 0x2c], 0
lea eax, [ecx + ebp]
push eax
push ebp
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], 0xf
mov byte [esp + 0x24], 0
call fcn.00404c2d
xor esi, esi
mov dword [ebx + 0x14], 7
xor eax, eax
mov dword [ebx + 0x10], esi
mov word [ebx], ax
lea esi, [esp + 0x18]
cmp dword [esp + 0x2c], 0x10
lea eax, [esp + 0x18]
mov ecx, ebx
cmovae esi, dword [esp + 0x18]
add esi, dword [esp + 0x28]
cmp dword [esp + 0x2c], 0x10
cmovae eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x14]
push eax
call fcn.004022fd
cmp dword [ebx + 0x14], 8
mov ebp, dword [eax]
jb 0x404b96
mov edi, dword [ebx]
jmp 0x404b98
mov edi, ebx
push esi
push dword [esp + 0x14]
lea ecx, [esp + 0x68]
call fcn.00405006
cmp dword [ebx + 0x14], 8
jb 0x404bb0
mov eax, dword [ebx]
jmp 0x404bb2
mov eax, ebx
test ebp, ebp
je 0x404bba
sub ebp, edi
sar ebp, 1
test edi, edi
je 0x404bc2
sub edi, eax
sar edi, 1
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x68]
mov ecx, ebx
push eax
push ebp
push edi
call fcn.00401fad
xor esi, esi
lea ecx, [esp + 0x60]
xor ebp, ebp
push esi
inc ebp
push ebp
call fcn.004023dd
push esi
push ebp
lea ecx, [esp + 0x20]
call fcn.00401d41
push esi
push ebp
lea ecx, [esp + 0x50]
call fcn.00401d41
push esi
push ebp
lea ecx, [esp + 0x38]
call fcn.00401d41
push esi
push ebp
lea ecx, [esp + 0x88]
call fcn.004023dd
push esi
push ebp
lea ecx, [esp + 0xa0]
call fcn.004023dd
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x6c
ret 0x30