Function at 0x401340
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x20]
add eax, 0xfffffe57
push ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc]
lea edx, [ecx - 0x12e]
push ebp
add eax, 0xffffdb09
mov ebp, ecx
push esi
mov esi, dword [esp + 0x1c]
xor ebp, 0x94
mov dword [esp + 0x2c], eax
lea eax, [ebx - 0x47]
push edi
lea edi, [ebx + 0xbd]
xor eax, 0x775
mov dword [esp + 0x1c], edi
cmp edi, eax
je 0x4015c3
cmp edx, ebx
jg 0x40155b
mov eax, dword [0x645e64]
add eax, 0xe9bd1f90
add eax, dword [esi + 0x34]
xor dword [0x645e0c], eax
xor ebp, ebp
mov dword [esi + 0xa0], 0x632098
mov eax, dword [0x645d9c]
mov ecx, 0x783057a
sub ecx, dword [eax + 0x10]
sub ecx, dword [eax + 4]
add dword [esi + 0x2c], ecx
mov eax, dword [esi + 0xa0]
mov ebx, dword [eax + ebp]
add ebp, 4
mov eax, dword [0x645d9c]
imul ebx, dword [esi + 0x6c]
mov eax, dword [eax + 4]
add eax, dword [esi + 0x78]
xor eax, 0xb
mov edx, ebx
add dword [esi + 0xd8], eax
mov eax, dword [0x645ec8]
dec eax
shr edx, 8
add eax, dword [esi + 0xec]
mov dword [0x645ec8], eax
mov eax, dword [0x645e24]
mov ecx, dword [esi + 0xa4]
mov byte [eax + ecx], dl
inc dword [0x645e24]
mov eax, dword [0x645d9c]
mov ecx, dword [eax + 0x84]
mov eax, dword [esi + 0xa4]
mov byte [ecx + eax], bl
mov eax, dword [0x645d9c]
inc dword [eax + 0x84]
mov eax, dword [0x645e38]
add dword [esi + 0x24], eax
mov eax, dword [esi + 0x4c]
sub eax, dword [esi + 0xd4]
sub eax, 0x1aeb0
xor dword [esi + 0x78], eax
mov ecx, dword [0x645d9c]
mov eax, dword [esi + 0x24]
xor eax, 0x1e3a2b
or dword [ecx + 0x2c], eax
mov ecx, dword [0x645d9c]
mov eax, dword [esi + 0x70]
xor eax, dword [0x645e14]
xor eax, 0xdb1bf
or dword [ecx + 0xb0], eax
mov eax, dword [esi + 0x4c]
sub eax, dword [esi + 0x40]
sub eax, 0x45
add dword [esi + 0xc8], eax
mov eax, dword [0x645d9c]
mov eax, dword [eax + 0xd8]
sub eax, 0xd
or dword [esi + 0xd4], eax
mov ecx, dword [0x645d9c]
mov eax, dword [esi + 0x2c]
xor eax, 0x1038e
sub dword [ecx + 0xb0], eax
xor ecx, ecx
mov eax, dword [0x645d9c]
inc ecx
mov eax, dword [eax + 0x40]
xor dword [esi + 0xd4], eax
mov eax, dword [0x645d9c]
sub ecx, dword [eax + 0x78]
xor eax, eax
add dword [esi + 0xa8], ecx
inc eax
sub eax, dword [esi + 0xa8]
sub eax, dword [0x645e8c]
add dword [esi + 0x24], eax
cmp ebp, 0x139e0
jl 0x4013ba
mov ecx, dword [0x645d9c]
mov eax, dword [ecx + 0x118]
cmp eax, dword [0x645e18]
jb 0x401517
mov eax, dword [esi + 0x2c]
xor eax, 0x10048
mov dword [esi + 0x6c], eax
mov ecx, dword [0x645d9c]
cmp dword [esi + 0x10], 0x16be9
je 0x401533
mov eax, 0xc10c7ac5
sub eax, dword [esi + 0x118]
add dword [0x645e0c], eax
jmp 0x40154b
mov eax, dword [ecx + 0xcc]
sub eax, dword [esi + 0x74]
add eax, dword [esi + 0x40]
add dword [esi + 0xf8], eax
mov ecx, dword [0x645d9c]
mov eax, 0xfffe6a20
sub eax, dword [esi + 0xd4]
add dword [ecx + 0x6c], eax
jmp 0x4015c3
mov eax, dword [esp + 0x30]
mov ebx, dword [0x645d9c]
and eax, ebp
or eax, dword [esi + 0x44]
cmp dword [ebx + 0x34], eax
jne 0x4015c3
mov eax, dword [0x645de4]
and edx, 0x24c3
xor eax, dword [esp + 0x30]
mov ecx, dword [ebx + 0x124]
or eax, 0x243f
sub ecx, dword [esi + 0x118]
or ecx, dword [ebx + 0xe8]
or edi, dword [esp + 0x10]
push eax
push 0x645da0
push edx
push ecx
push edi
call fcn.0041b530
mov ecx, dword [esi + 0xe0]
add esp, 0x14
imul ecx, dword [esi + 0x44]
mov dword [esp + 0x1c], eax
imul ecx, dword [esp + 0x10]
or dword [esi + 0xf8], ecx
mov dword [esi + 0xa0], 0x4d6598
xor edi, edi
mov eax, dword [esi + 0xa0]
mov ecx, dword [esi + 0x84]
mov ebx, dword [edi + eax]
add edi, 4
mov eax, dword [0x645d9c]
imul ebx, dword [eax + 0x6c]
mov eax, dword [esi + 0x78]
sub eax, dword [esi + 0x70]
xor dword [esi + 0xf8], eax
mov eax, dword [0x645e44]
mov edx, ebx
shr edx, 8
mov byte [eax + ecx], dl
inc dword [esi + 0x84]
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x84]
sub eax, 0x45
or dword [esi + 0x118], eax
mov eax, dword [0x645e44]
mov byte [ecx + eax], bl
inc dword [esi + 0x84]
mov eax, dword [0x645d9c]
mov eax, dword [eax + 0x20]
sub dword [esi + 0x118], eax
mov eax, dword [0x645dec]
sub eax, dword [esi + 0xc4]
mov ecx, dword [0x645d9c]
sub eax, 0x45
add dword [ecx + 0xa8], eax
mov eax, dword [0x645e10]
add eax, 0xfffffff2
add eax, dword [esi + 0xd8]
add dword [esi + 0x98], eax
cmp edi, 0x187b0
jl 0x4015cf
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
add eax, 0xc3
pop ebx
pop ecx
ret