Function at 0x40595e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
jne 0x405979
push 0xffffffffffffff9a
jmp 0x405989
mov esi, dword [eax + 0x9c]
cmp esi, edi
je 0x405975
cmp dword [esi], edi
jne 0x40598f
push 0xffffffffffffff9c
pop eax
jmp 0x405b80
mov ecx, dword [ebp + 0x10]
cmp ecx, edi
je 0x405b74
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
cmp ecx, eax
jbe 0x4059b5
cmp dword [esi + 0x8c], edi
jne 0x4059b5
mov dword [esi + 0x14], eax
mov eax, dword [esi + 8]
mov edx, dword [esi + 0x58]
add eax, edx
cmp ecx, eax
jbe 0x4059cc
cmp dword [esi + 0x8c], edi
je 0x4059cc
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], edi
jbe 0x405b6f
jmp 0x4059d9
xor edi, edi
cmp dword [esi + 8], edi
jne 0x405aa8
mov eax, dword [esi + 0x58]
cmp eax, edi
jbe 0x405aa8
mov ebx, 0x4000
cmp eax, ebx
mov dword [ebp + 0x10], ebx
jae 0x405a06
cmp eax, edi
mov dword [ebp + 0x10], eax
je 0x405b74
mov ebx, eax
mov eax, dword [esi + 0x88]
push edi
add eax, dword [esi + 0x3c]
push eax
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [esi + 0x70]
add esp, 0x10
test eax, eax
jne 0x405b78
push ebx
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [esi + 0x64]
add esp, 0x10
cmp eax, ebx
jne 0x405b78
mov eax, dword [ebp + 8]
cmp dword [eax + 0xa0], edi
je 0x405a9a
test ebx, ebx
jbe 0x405a98
mov eax, dword [esi]
lea ebx, [eax + edi]
mov eax, dword [ebp + 8]
push dword [eax + 0xb0]
add eax, 0xa4
push eax
call fcn.004056d7
xor byte [ebx], al
mov eax, dword [esi]
movsx eax, byte [eax + edi]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0xb0]
add eax, 0xa4
push eax
call fcn.004056f2
mov ecx, dword [esi]
add esp, 0x14
mov byte [ecx + edi], al
inc edi
cmp edi, dword [ebp + 0x10]
jb 0x405a51
mov ebx, dword [ebp + 0x10]
xor edi, edi
mov eax, dword [esi]
add dword [esi + 0x3c], ebx
sub dword [esi + 0x58], ebx
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
cmp dword [esi + 0x84], edi
je 0x405b0c
cmp dword [esi + 0x8c], edi
jne 0x405b0c
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x18]
mov dword [ebp + 0x10], eax
lea eax, [esi + 4]
push 2
push eax
call fcn.004062b3
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp - 8], eax
jl 0x405ae1
cmp dword [esi + 0x1c], edi
je 0x405ae1
mov dword [ebp - 8], 0xfffffffd
mov edi, dword [esi + 0x18]
sub edi, ebx
push edi
push dword [ebp + 0x10]
push dword [esi + 0x50]
call fcn.00405f13
sub dword [esi + 0x5c], edi
add dword [ebp - 4], edi
add esp, 0xc
cmp dword [ebp - 8], 1
mov dword [esi + 0x50], eax
je 0x405b6f
cmp dword [ebp - 8], 0
jne 0x405b7d
jmp 0x405b5f
mov eax, dword [esi + 8]
cmp eax, edi
jne 0x405b18
cmp dword [esi + 0x58], edi
je 0x405b6f
mov edi, dword [esi + 0x14]
cmp edi, eax
jb 0x405b21
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x405b38
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x10]
mov cl, byte [ecx + eax]
mov byte [edx + eax], cl
inc eax
cmp eax, edi
jb 0x405b27
push edi
push dword [esi + 0x10]
push dword [esi + 0x50]
call fcn.00405f13
sub dword [esi + 0x5c], edi
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 0x10], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add esp, 0xc
add dword [ebp - 4], edi
mov dword [esi + 0x50], eax
cmp dword [esi + 0x14], 0
ja 0x4059d7
cmp dword [ebp - 8], 0
jne 0x405b7d
mov eax, dword [ebp - 4]
jmp 0x405b80
xor eax, eax
jmp 0x405b80
or eax, 0xffffffff
jmp 0x405b80
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret