Function at 0x498820
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push esi
mov esi, ecx
mov edx, 4
xor ecx, ecx
push edi
mov eax, dword [esi + 0xc]
imul eax, dword [esi + 0x14]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005030d4
mov ecx, dword [esi + 0xc]
mov edi, eax
imul ecx, dword [esi + 0x14]
mov dword [esp + 0x10], edi
shl ecx, 2
push ecx
push 0
push edi
call fcn.00505530
xor ecx, ecx
add esp, 0x10
xor edx, edx
cmp dword [esi + 0x14], ecx
jbe 0x49889d
lea esp, [esp]
mov eax, dword [esi + 0x18]
cmp byte [eax + ecx], 0
je 0x498887
lea esp, [esp]
inc ecx
cmp byte [eax + ecx], 0
jne 0x498880
mov eax, dword [esi + 0xc]
imul eax, edx
inc edx
add eax, ecx
inc ecx
mov dword [edi + eax*4], 1
cmp edx, dword [esi + 0x14]
jb 0x498870
xor ecx, ecx
push ebx
xor ebx, ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x14], ebx
cmp dword [esi + 0xc], ecx
jbe 0x498aa2
push ebp
mov eax, dword [esi + 0x18]
cmp byte [ebx + eax], 0
je 0x4988fb
mov ecx, dword [esi + 0x14]
cmp ebx, dword [esi + 0xc]
jae 0x4988f3
xor edx, edx
test ecx, ecx
je 0x4988e9
jmp 0x4988d0
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
imul ecx, edx
inc edx
add ecx, ebx
mov eax, dword [eax + ecx*4]
xor dword [edi + ecx*4], eax
mov ecx, dword [esi + 0x14]
cmp edx, ecx
jb 0x4988d0
mov eax, dword [esi + 0x18]
inc ebx
cmp byte [ebx + eax], 0
jne 0x4988c0
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
mov edx, dword [esi + 0xc]
cmp ebx, edx
je 0x498aa1
mov eax, edx
lea ebp, [ebx*4]
imul eax, ecx
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x2c], ebp
shl eax, 2
add ecx, eax
add eax, edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov ebp, dword [ecx + ebp]
test ebp, ebp
jne 0x498935
mov dword [esp + 0x1c], ebp
jmp 0x498951
mov eax, dword [esi + 4]
mov ecx, 0xffff
sub ecx, dword [eax + ebp*4]
mov eax, dword [esi]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], 0
test edx, edx
je 0x4989b3
mov edi, dword [esp + 0x28]
mov ebx, ecx
mov ebp, eax
sub ebx, eax
jmp 0x498970
mov ecx, dword [esi + 4]
lea ebp, [ebp + 4]
mov eax, dword [ebx + ebp - 4]
inc edi
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x1c]
add edx, dword [ecx + eax*4]
mov eax, dword [esi]
mov eax, dword [eax + edx*4]
mov dword [ebx + ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x1c]
add edx, dword [ecx + eax*4]
mov eax, dword [esi]
mov eax, dword [eax + edx*4]
mov dword [ebp - 4], eax
cmp edi, dword [esi + 0xc]
jb 0x498970
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
xor ebp, ebp
mov dword [esp + 0x28], ebp
cmp dword [esi + 0x14], ebp
jbe 0x498a8a
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
lea ebx, [ebx]
cmp ebp, eax
je 0x498a74
mov ecx, dword [esi + 0xc]
mov eax, ecx
mov edi, dword [esi + 0x1c]
imul eax, ebp
mov dword [esp + 0x34], 0
shl eax, 2
add edi, eax
add eax, ebx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + edi]
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x498a70
mov edx, dword [esp + 0x20]
mov eax, edi
mov ebp, dword [esp + 0x30]
neg eax
mov ebx, dword [esp + 0x34]
add edx, eax
add eax, dword [esp + 0x24]
sub ebp, edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
mov eax, dword [edx + edi]
lea edi, [edi + 4]
mov ecx, dword [esi + 4]
inc ebx
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x1c]
add edx, dword [ecx + eax*4]
mov eax, dword [esi]
mov eax, dword [eax + edx*4]
xor dword [edi - 4], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esi + 4]
mov eax, dword [eax + edi - 4]
mov ecx, dword [edx + eax*4]
mov eax, dword [esp + 0x1c]
add ecx, dword [edx + eax*4]
mov eax, dword [esi]
mov edx, dword [esp + 0x3c]
mov eax, dword [eax + ecx*4]
xor dword [edi + ebp - 4], eax
cmp ebx, dword [esi + 0xc]
jb 0x498a25
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
inc ebp
mov dword [esp + 0x28], ebp
cmp ebp, dword [esi + 0x14]
jb 0x4989d0
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc ebx
inc ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ecx
cmp ebx, dword [esi + 0xc]
jb 0x4988b4
pop ebp
mov eax, dword [esi + 0xc]
xor edx, edx
imul eax, dword [esi + 0x14]
pop ebx
test eax, eax
je 0x498ac5
mov ecx, dword [esi + 0x1c]
mov eax, dword [edi + edx*4]
mov dword [ecx + edx*4], eax
inc edx
mov eax, dword [esi + 0xc]
imul eax, dword [esi + 0x14]
cmp edx, eax
jb 0x498ab0
push edi
call fcn.005030dd
add esp, 4
pop edi
pop esi
add esp, 0x30
ret