Function at 0x4142b0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4144a9
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4142d0
mov eax, ecx
xor ecx, ecx
test eax, eax
je 0x4142e1
sar eax, 1
test eax, eax
jle 0x4142df
inc ecx
jmp 0x4142d6
mov eax, ecx
cmp eax, dword [esp + 0x14]
jge 0x4142eb
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x24]
push ebx
push ebp
cmp eax, 0x888
push edi
mov ebp, 0x565
je 0x414319
cmp eax, 0x8000
je 0x414312
cmp eax, 0x8888
jne 0x41431e
mov ebp, 0x4444
jmp 0x41431e
mov ebp, 0x8000
jmp 0x41431e
mov ebp, 0x565
mov eax, ebp
mov ecx, ebp
sar eax, 0xc
sar ecx, 8
mov edx, ebp
and eax, 0xf
and ecx, 0xf
xor edi, edi
sar edx, 4
add eax, ecx
and edx, 0xf
mov ecx, ebp
add eax, edx
and ecx, 0xf
lea eax, [eax + ecx + 7]
cdq
and edx, 7
add eax, edx
mov edx, dword [esi + 0x2c]
mov ebx, eax
mov eax, dword [0x485518]
mov dword [esp + 0x14], edx
cdq
sar ebx, 3
idiv ebx
mov ecx, eax
test ecx, ecx
je 0x4143a2
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0x1c]
imul eax, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x4143bc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
xor edx, edx
lea eax, [eax + ecx - 1]
div ecx
shr dword [esp + 0x1c], 2
imul eax, ecx
add edi, eax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x41437f
jmp 0x4143bc
mov ecx, dword [esi + 0x20]
mov eax, dword [esp + 0x1c]
imul eax, ecx
mov ecx, dword [esp + 0x20]
test ecx, ecx
jle 0x4143bc
add edi, eax
shr eax, 2
dec ecx
jne 0x4143b4
mov eax, edi
mov edx, dword [esi + 0x30]
imul eax, ebx
imul edx, eax
mov ecx, dword [esi + 0x54]
push edx
mov dword [esi + 0x2c], eax
mov dword [esp + 0x20], ecx
call fcn.00450d2b
mov ecx, dword [esi + 0x38]
mov dword [esi + 0x54], eax
mov edi, eax
mov eax, dword [esp + 0x24]
sub ecx, eax
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x24]
imul eax, dword [esi + 0x20]
imul eax, ebx
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x30]
add esp, 4
inc ecx
xor ebx, ebx
mov dword [esi + 0x3c], ecx
test eax, eax
mov dword [esp + 0x20], edx
mov dword [esi + 0x24], ebp
jbe 0x41444c
mov ecx, dword [esi + 0x1c]
mov edx, dword [esp + 0x20]
imul ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
mov ebp, dword [esp + 0x1c]
push ecx
push edx
push eax
push ebp
push edi
call fcn.00414190
push edi
push esi
call fcn.00413ca0
mov eax, dword [esp + 0x30]
mov edx, dword [esi + 0x2c]
add esp, 0x1c
add ebp, eax
mov eax, dword [esi + 0x30]
add edi, edx
inc ebx
mov dword [esp + 0x1c], ebp
cmp ebx, eax
jb 0x41440f
xor edx, edx
xor eax, eax
movsx ecx, byte [esi + eax + 4]
mov edi, ecx
imul edi, eax
add edi, edx
xor edi, ecx
inc eax
cmp eax, 0x10
mov edx, edi
jl 0x414450
mov eax, dword [esi + 0x30]
mov edi, dword [esi + 0x2c]
mov ecx, dword [esi + 0x34]
mov ebx, dword [esi + 0x1c]
mov ebp, dword [esi + 0x24]
add eax, edi
mov edi, dword [esi + 0x20]
add eax, ecx
mov ecx, dword [esi + 0x14]
add eax, ebp
add ecx, ebx
mov word [esi + 0x4c], 0
add ecx, edi
pop edi
xor eax, ecx
pop ebp
mov ecx, eax
and eax, 0xffff
shr ecx, 0x10
shl eax, 0x10
xor ecx, eax
pop ebx
or ecx, edx
or ecx, 0xa0000000
mov dword [esi], ecx
pop esi
add esp, 8
ret