Function at 0x418970
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x54
push ebx
push esi
push edi
mov edi, dword [esp + 0x68]
imul edi, dword [esp + 0x64]
mov esi, edx
xor bl, bl
mov byte [esp + 0xf], bl
mov dword [esp + 0x28], edi
test esi, esi
je 0x418f3d
cmp dword [esp + 0x6c], 0
je 0x418f3d
cmp dword [esp + 0x70], 0
je 0x418f3d
test eax, eax
je 0x4189bb
mov eax, dword [eax]
test eax, eax
js 0x4189bb
mov edx, eax
mov dword [esp + 0x20], eax
jmp 0x4189c4
mov edx, 0x64
mov dword [esp + 0x20], edx
test ecx, ecx
je 0x4189ce
mov eax, dword [ecx]
test eax, eax
jns 0x4189d3
mov eax, 0x32
mov dword [esp + 0x14], eax
cmp edx, 0xff
jle 0x4189e8
mov edx, 0xff
mov dword [esp + 0x20], edx
cmp eax, 0xff
jle 0x4189f8
mov eax, 0xff
mov dword [esp + 0x14], eax
cmp eax, edx
jle 0x418a00
mov dword [esp + 0x14], edx
push edi
call fcn.004c4f28
mov edx, eax
add esp, 4
mov dword [esp + 0x38], edx
test edx, edx
je 0x418f3d
xor eax, eax
test edi, edi
jle 0x418a60
lea ecx, [ecx]
cmp byte [esp + 0x74], 0
je 0x418a2d
movzx ecx, byte [esi + eax*4]
jmp 0x418a58
movzx ecx, byte [esi + eax*4 + 2]
lea ebx, [ecx*8]
sub ebx, ecx
movzx ecx, byte [esi + eax*4 + 1]
imul ecx, ecx, 0x96
lea ecx, [ecx + ebx*4]
movzx ebx, byte [esi + eax*4]
imul ebx, ebx, 0x4d
add ecx, ebx
sar ecx, 8
movzx ecx, cl
mov byte [eax + edx], cl
inc eax
cmp eax, edi
jl 0x418a20
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
push ebp
neg ecx
or ecx, eax
push ecx
call fcn.004c5d48
mov ebx, eax
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
mov dword [esp + 0x4c], ebx
neg ecx
or ecx, eax
push ecx
call fcn.004c5d48
mov dword [esp + 0x38], eax
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004c5d48
mov dword [esp + 0x40], eax
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004c5d48
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x60], ebp
test ebx, ebx
je 0x418ee8
cmp dword [esp + 0x30], 0
je 0x418ee8
cmp dword [esp + 0x34], 0
je 0x418ee8
test ebp, ebp
je 0x418ee8
mov ecx, edi
xor eax, eax
test ecx, ecx
jle 0x418b20
mov edx, dword [esp + 0x70]
mov edi, edi
mov dword [ebx + eax*4], 0
mov byte [eax + edx], 0
inc eax
cmp eax, ecx
jl 0x418b10
mov edx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
lea eax, [edx - 1]
mov dword [esp + 0x14], 1
cmp eax, 1
jle 0x418c66
lea eax, [esi - 1]
nop
mov ecx, dword [esp + 0x14]
imul ecx, esi
mov dword [esp + 0x1c], 1
cmp eax, 1
jle 0x418c4a
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x34]
lea edi, [ecx + 1]
lea ebp, [ebx + ecx*4 + 4]
mov dword [esp + 0x28], edi
lea edi, [ecx + edx + 1]
mov ecx, dword [esp + 0x30]
sub ecx, ebx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x48]
sub ecx, ebx
mov dword [esp + 0x5c], ecx
lea eax, [edx + 1]
mov ecx, edx
sub ecx, eax
dec ecx
sub eax, edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x28]
movzx eax, byte [edi + esi - 1]
sub edx, esi
add edx, dword [esp + 0x3c]
mov dword [esp + 0x44], eax
movzx ecx, byte [edx + 1]
movzx ebx, byte [edx - 1]
mov eax, dword [esp + 0x50]
movzx edx, byte [edx]
mov dword [esp + 0x20], ecx
movzx ecx, byte [edi + esi + 1]
add eax, edi
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x54]
movzx ecx, byte [eax + ecx]
movzx eax, byte [eax]
add eax, eax
add ecx, ecx
mov dword [esp + 0x58], ecx
mov ecx, eax
movzx eax, byte [edi + esi]
sub ecx, dword [esp + 0x58]
add eax, eax
sub ecx, dword [esp + 0x44]
add edx, edx
sub eax, edx
sub eax, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
sub eax, ebx
add eax, dword [esp + 0x40]
sub ecx, ebx
add eax, dword [esp + 0x44]
add ecx, dword [esp + 0x40]
inc dword [esp + 0x28]
add ecx, dword [esp + 0x20]
inc edi
mov dword [edx + ebp], ecx
mov dword [ebp], eax
cdq
mov esi, eax
xor esi, edx
sub esi, edx
mov eax, ecx
mov ecx, dword [esp + 0x1c]
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, dword [esp + 0x5c]
mov dword [eax + ebp], esi
mov esi, dword [esp + 0x68]
inc ecx
lea eax, [esi - 1]
add ebp, 4
mov dword [esp + 0x1c], ecx
cmp ecx, eax
jl 0x418b95
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x14]
inc ecx
lea edi, [edx - 1]
mov dword [esp + 0x14], ecx
cmp ecx, edi
jl 0x418b40
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x60]
lea ecx, [edx - 1]
mov dword [esp + 0x14], 1
cmp ecx, 1
jle 0x418eba
lea ebx, [ebx]
mov eax, dword [esp + 0x14]
lea ecx, [esi - 1]
imul eax, esi
mov dword [esp + 0x1c], 1
cmp ecx, 1
jle 0x418dae
mov edx, dword [esp + 0x34]
lea edi, [edx + eax*4 + 4]
lea ecx, [eax + 1]
lea eax, [ebx + eax*4 + 8]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
sub eax, edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x38], eax
lea esp, [esp]
mov edx, dword [esp + 0x20]
mov edi, dword [edx - 4]
cmp edi, dword [esp + 0x18]
jle 0x418d88
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
mov eax, dword [eax + edx]
mov dword [esp + 0x60], eax
test eax, eax
je 0x418d04
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
shl eax, 0xa
cdq
idiv dword [esp + 0x60]
test eax, eax
jle 0x418d1b
cmp eax, 0x1a8
jl 0x418d2b
cmp eax, 0x9a8
jl 0x418d3c
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4]
jl 0x418d88
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4]
jge 0x418d64
jmp 0x418d88
neg eax
cmp eax, 0x9a8
jg 0x418d04
cmp eax, 0x1a8
jg 0x418d51
mov edx, dword [esp + 0x20]
cmp edi, dword [edx - 8]
jl 0x418d88
mov eax, edx
cmp edi, dword [eax]
jge 0x418d64
jmp 0x418d88
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4 + 4]
jl 0x418d88
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4 - 4]
jge 0x418d64
jmp 0x418d88
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4 - 4]
jl 0x418d88
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4 + 4]
jl 0x418d88
cmp edi, dword [esp + 0x24]
jle 0x418d80
mov edx, dword [esp + 0x70]
lea eax, [ecx + edx]
mov byte [eax], 0xff
mov dword [ebp], eax
mov esi, dword [esp + 0x68]
add ebp, 4
jmp 0x418d88
mov eax, dword [esp + 0x70]
mov byte [ecx + eax], 0x64
mov eax, dword [esp + 0x1c]
mov edx, 4
add dword [esp + 0x28], edx
add dword [esp + 0x20], edx
inc eax
lea edx, [esi - 1]
inc ecx
mov dword [esp + 0x1c], eax
cmp eax, edx
jl 0x418cc0
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
inc eax
lea ecx, [edx - 1]
mov dword [esp + 0x14], eax
cmp eax, ecx
jl 0x418c80
mov edx, dword [esp + 0x4c]
cmp ebp, edx
je 0x418eba
mov edi, edi
mov eax, dword [ebp - 4]
sub ebp, 4
cmp byte [eax + 1], 0x64
lea ecx, [eax + 1]
jne 0x418dec
mov byte [ecx], 0xff
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax - 1], 0x64
lea ecx, [eax - 1]
jne 0x418e02
mov byte [ecx], 0xff
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi], 0x64
jne 0x418e1c
mov byte [eax + esi], 0xff
mov ecx, dword [esp + 0x68]
add ecx, eax
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
mov ecx, eax
sub ecx, esi
cmp byte [ecx], 0x64
jne 0x418e38
mov byte [ecx], 0xff
mov ecx, eax
sub ecx, dword [esp + 0x68]
add ebp, 4
mov dword [ebp - 4], ecx
mov esi, dword [esp + 0x68]
mov ecx, eax
sub ecx, esi
cmp byte [ecx - 1], 0x64
jne 0x418e57
mov byte [ecx - 1], 0xff
mov ecx, eax
sub ecx, dword [esp + 0x68]
dec ecx
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
mov ecx, eax
sub ecx, esi
cmp byte [ecx + 1], 0x64
jne 0x418e76
mov byte [ecx + 1], 0xff
mov ecx, eax
sub ecx, dword [esp + 0x68]
inc ecx
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi - 1], 0x64
jne 0x418e94
mov byte [eax + esi - 1], 0xff
mov ecx, dword [esp + 0x68]
lea ecx, [eax + ecx - 1]
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi + 1], 0x64
jne 0x418eb2
mov byte [eax + esi + 1], 0xff
mov ecx, dword [esp + 0x68]
lea eax, [eax + ecx + 1]
mov dword [ebp], eax
mov esi, dword [esp + 0x68]
add ebp, 4
cmp ebp, edx
jne 0x418dd0
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x70]
xor eax, eax
test edx, edx
jle 0x418ed7
cmp byte [eax + ecx], 0xff
je 0x418ed2
mov byte [eax + ecx], 0
inc eax
cmp eax, edx
jl 0x418ec8
mov cl, byte [ecx]
mov edx, dword [esp + 0x74]
mov ebp, dword [esp + 0x4c]
mov byte [edx], cl
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x3c]
push eax
call fcn.004c57e5
add esp, 4
test ebx, ebx
je 0x418f02
push ebx
call fcn.004c607b
add esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x418f13
push eax
call fcn.004c607b
add esp, 4
mov eax, dword [esp + 0x34]
test eax, eax
je 0x418f24
push eax
call fcn.004c607b
add esp, 4
test ebp, ebp
je 0x418f31
push ebp
call fcn.004c607b
add esp, 4
mov al, byte [esp + 0x13]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x54
ret
pop edi
pop esi
mov al, bl
pop ebx
add esp, 0x54
ret