Function at 0x4a0b60
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], 0
test edi, edi
jne 0x4a0b80
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
pop ecx
ret
mov esi, dword [edi + 0x9c]
test esi, esi
jne 0x4a0b95
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
pop ecx
ret
cmp dword [esi], 0
jne 0x4a0ba5
pop edi
pop esi
pop ebp
mov eax, 0xffffff9c
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4a0bb5
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], ecx
mov ecx, dword [esi + 0x5c]
cmp eax, ecx
jbe 0x4a0bd3
mov edx, dword [esi + 0x8c]
test edx, edx
jne 0x4a0bd3
mov dword [esi + 0x14], ecx
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0x58]
add ecx, edx
cmp eax, ecx
jbe 0x4a0bec
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x4a0bec
mov dword [esi + 0x14], ecx
mov eax, dword [esi + 0x14]
test eax, eax
jbe 0x4a0ddd
jmp 0x4a0bfd
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 8]
test eax, eax
jne 0x4a0cd9
mov eax, dword [esi + 0x58]
test eax, eax
jbe 0x4a0cd9
mov ebp, 0x4000
cmp eax, ebp
jae 0x4a0c22
mov ebp, eax
test ebp, ebp
je 0x4a0bad
mov edx, dword [esi + 0x88]
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x7c]
add edx, eax
mov eax, dword [esi + 0x80]
push 0
push edx
push eax
push ecx
call dword [esi + 0x70]
add esp, 0x10
test eax, eax
jne 0x4a0de7
mov edx, dword [esi]
mov eax, dword [esi + 0x80]
mov ecx, dword [esi + 0x7c]
push ebp
push edx
push eax
push ecx
call dword [esi + 0x64]
add esp, 0x10
cmp eax, ebp
jne 0x4a0de7
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x4a0cc1
xor edi, edi
test ebp, ebp
jbe 0x4a0cc1
mov eax, dword [esp + 0x18]
mov edx, dword [esi]
mov ecx, dword [eax + 0xb0]
add eax, 0xa4
push ecx
push eax
lea ebx, [edx + edi]
call fcn.004a0850
mov cl, byte [ebx]
xor cl, al
mov byte [ebx], cl
mov edx, dword [esi]
movsx eax, byte [edx + edi]
push eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0xb0]
add eax, 0xa4
push ecx
push eax
call fcn.004a0870
mov edx, dword [esi]
add esp, 0x14
mov byte [edx + edi], al
inc edi
cmp edi, ebp
jb 0x4a0c76
mov ecx, dword [esi + 0x3c]
mov eax, dword [esi + 0x58]
add ecx, ebp
sub eax, ebp
mov dword [esi + 0x58], eax
mov eax, dword [esi]
mov dword [esi + 0x3c], ecx
mov dword [esi + 4], eax
mov dword [esi + 8], ebp
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4a0d56
mov eax, dword [esi + 0x8c]
test eax, eax
jne 0x4a0d56
mov ecx, dword [esi + 0x10]
mov ebx, dword [esi + 0x18]
lea edx, [esi + 4]
push 2
push edx
mov dword [esp + 0x28], ecx
call fcn.004d3370
mov ebp, eax
add esp, 8
test ebp, ebp
jl 0x4a0d17
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4a0d17
mov ebp, 0xfffffffd
mov edi, dword [esi + 0x18]
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x50]
sub edi, ebx
push edi
push eax
push ecx
call fcn.004d2f20
mov edx, dword [esi + 0x5c]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
sub edx, edi
add ecx, edi
cmp ebp, 1
mov dword [esi + 0x50], eax
mov dword [esi + 0x5c], edx
mov dword [esp + 0x10], ecx
je 0x4a0ddd
test ebp, ebp
jne 0x4a0df0
jmp 0x4a0dd2
mov eax, dword [esi + 8]
test eax, eax
jne 0x4a0d64
mov ecx, dword [esi + 0x58]
test ecx, ecx
je 0x4a0ddd
mov edi, dword [esi + 0x14]
cmp edi, eax
jb 0x4a0d6d
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x4a0d84
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov dl, byte [edx + eax]
mov byte [ecx + eax], dl
inc eax
cmp eax, edi
jb 0x4a0d73
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x50]
push edi
push eax
push ecx
call fcn.004d2f20
mov ecx, dword [esi + 0x5c]
mov ebp, dword [esi + 0x14]
mov ebx, dword [esi + 0x10]
mov edx, dword [esi + 4]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 8]
sub ecx, edi
sub eax, edi
mov dword [esi + 0x5c], ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x1c]
add esp, 0xc
sub ebp, edi
add ebx, edi
add edx, edi
add ecx, edi
add eax, edi
mov dword [esi + 0x14], ebp
mov dword [esi + 0x10], ebx
mov dword [esi + 4], edx
mov dword [esi + 0x18], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x14]
test eax, eax
ja 0x4a0bf9
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret