Function at 0x5795d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
xor ebx, ebx
push edi
lea eax, [ebp - 0x2c]
push ebx
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 0x10]
push eax
mov dword [ebp - 0x28], ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x2c], ebx
call fcn.00579248
add esp, 0x28
test al, al
je 0x57977d
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
test cl, 0x10
mov esi, eax
jne 0x57962a
test ecx, 0x400000
je 0x57962e
sar eax, 1
mov esi, eax
mov eax, ecx
and eax, 0x40
je 0x579637
sar esi, 1
test ecx, 0x40000
je 0x579649
cmp eax, ebx
je 0x579649
and ch, 0xef
mov dword [ebp + 0x10], ecx
mov edx, ecx
mov eax, 0xff
and dl, 0x40
push eax
neg dl
sbb edx, edx
and dl, 0x7f
add edx, 0x80
push edx
push eax
push dword [ebp - 0x10]
push ecx
push esi
push dword [ebp + 8]
call fcn.0056c8e7
mov esi, eax
cmp esi, ebx
je 0x57977d
mov eax, dword [esi + 0x10c]
dec eax
push eax
push ebx
push esi
call fcn.0056d053
mov eax, dword [ebp - 0x14]
push ebx
mov dword [esi + 0x165], eax
push dword [ebp - 0x18]
push dword [ebp + 0xc]
call fcn.0056decf
add esp, 0xc
lea eax, [ebp - 0x1c]
mov edi, dword [esi + 0x165]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
push ebx
push esi
call fcn.0056cee4
test al, al
jne 0x5796d0
push esi
call fcn.0056c97e
jmp 0x57977d
cmp dword [edi + 4], ebx
jne 0x5796d9
cmp dword [edi], ebx
je 0x5796df
test byte [ebp + 0x12], 0x40
je 0x579707
test byte [ebp + 0x10], 0x10
push dword [ebp + 0xc]
je 0x579700
mov eax, dword [ebp - 4]
shr eax, 1
push eax
push 2
push dword [ebp + 8]
call fcn.0056dcd9
add esp, 0x10
jmp 0x579797
push dword [ebp - 4]
push 1
jmp 0x5796f0
mov edi, 0x51e138
push 0x2ea
push edi
push dword [ebp - 4]
push ebx
call fcn.00568809
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x579736
push esi
call fcn.0056c97e
mov dword [0x53a284], 0xc
jmp 0x57977d
push dword [ebp + 0xc]
push dword [ebp - 4]
push 1
push ebx
call fcn.0056dcd9
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
push ebx
push esi
call fcn.005794fd
add esp, 0x24
test al, al
jne 0x579784
push esi
call fcn.0056c97e
push 0x2f7
push edi
push ebx
push 0
call fcn.005687af
add esp, 0x10
mov dword [0x53a284], 0xb
xor eax, eax
jmp 0x579813
push 0x2fc
push edi
push ebx
push 0
call fcn.005687af
add esp, 0x10
xor ebx, ebx
test byte [ebp + 0x10], 8
je 0x5797b1
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp dword [ebp - 0xc], ebx
jbe 0x5797b1
xor byte [eax], 0x80
inc eax
inc ecx
cmp ecx, dword [ebp - 0xc]
jb 0x5797a7
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
push dword [ebp - 0x20]
push dword [ebp + 8]
push esi
call fcn.0056cf81
test byte [ebp + 0x10], 0x10
mov eax, dword [ebp - 8]
je 0x5797ce
sar eax, 1
test byte [ebp + 0x10], 0x40
je 0x5797d6
sar eax, 1
cmp dword [ebp - 0x2c], ebx
jne 0x5797eb
cmp dword [ebp - 0x28], ebx
jne 0x5797eb
dec eax
push eax
push ebx
push esi
call fcn.0056d053
jmp 0x579805
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push esi
call fcn.0056d053
test byte [ebp + 0x10], 1
jne 0x579805
push 2
push esi
call fcn.0056cfca
push dword [esi + 0x165]
call fcn.005794b2
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret