Function at 0x5817e8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
cmp dword [0x62c0a0], 0
push ebx
push esi
push edi
je 0x58184d
lea eax, [ebp - 0x18]
push eax
call fcn.0054819c
pop ecx
push 0xdd
push 0x62c0e8
push 0x13
push 5
call fcn.00548254
add esp, 0x10
lea edx, [ebp - 0x18]
push edx
push 0x655f78
call fcn.005481e8
add esp, 8
cmp eax, 1
sbb ecx, ecx
neg ecx
mov dword [ebp - 0x10], ecx
push 0xdf
push 0x62c100
push 0x13
push 6
call fcn.00548254
add esp, 0x10
jmp 0x581852
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x58186e
push 0xe4
push 0x62c118
push 0x12
push 9
call fcn.00548254
add esp, 0x10
mov ebx, dword [0x62c088]
mov eax, dword [0x62c08c]
mov dword [ebp - 0xc], eax
mov edx, dword [0x62c090]
mov dword [ebp - 8], edx
push 0x14
push 0x655f63
lea ecx, [ebp - 0x2c]
push ecx
call fcn.0050a50c
add esp, 0xc
mov eax, dword [ebp + 0xc]
add dword [0x62c088], eax
cmp dword [0x62c088], 0x3ff
jl 0x5818cc
mov ecx, 0x3ff
mov eax, dword [0x62c088]
cdq
idiv ecx
mov dword [0x62c088], edx
mov dword [0x62c084], 0x3ff
jmp 0x5818e8
mov eax, dword [0x62c084]
cmp eax, 0x3ff
jge 0x5818e8
mov edx, dword [0x62c088]
cmp eax, edx
jge 0x5818e8
mov dword [0x62c084], edx
mov eax, dword [ebp + 0xc]
mov ecx, 0x14
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov esi, 0x14
cdq
idiv esi
test edx, edx
setg al
and eax, 1
add ecx, eax
add dword [0x62c090], ecx
cmp dword [ebp - 0x10], 0
jne 0x58192c
push 0x104
push 0x62c130
push 0x12
push 0xa
call fcn.00548254
add esp, 0x10
lea edx, [ebp - 0x44]
push edx
call fcn.00585f38
pop ecx
xor ecx, ecx
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jge 0x581a3d
mov edi, dword [ebp + 0xc]
sub edi, dword [ebp - 4]
cmp edi, 0x14
jle 0x581959
mov eax, 0x14
jmp 0x58195b
mov eax, edi
mov edi, eax
push 0
call fcn.00587784
push eax
lea edx, [ebp - 0x44]
push edx
call fcn.00585f98
add esp, 0xc
push 0x14
lea ecx, [ebp - 0x2c]
push ecx
lea eax, [ebp - 0x44]
push eax
call fcn.00586150
add esp, 0xc
lea esi, [edi + ebx - 0x3ff]
test esi, esi
jle 0x5819bb
mov eax, edi
mov edx, 0x655b50
sub eax, esi
add edx, ebx
push eax
push edx
lea ecx, [ebp - 0x44]
push ecx
call fcn.00586150
add esp, 0xc
lea eax, [ebp - 0x44]
push esi
push 0x655b50
push eax
call fcn.00586150
add esp, 0xc
jmp 0x5819d0
push edi
mov edx, 0x655b50
add edx, ebx
push edx
lea ecx, [ebp - 0x44]
push ecx
call fcn.00586150
add esp, 0xc
push edi
mov eax, dword [ebp + 8]
push eax
lea edx, [ebp - 0x44]
push edx
call fcn.00586150
add esp, 0xc
push 8
lea ecx, [ebp - 0xc]
push ecx
lea eax, [ebp - 0x44]
push eax
call fcn.00586150
add esp, 0xc
push 0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x44]
push ecx
call fcn.00586190
add esp, 0xc
inc dword [ebp - 8]
add dword [ebp + 8], edi
xor esi, esi
lea eax, [ebp - 0x2c]
cmp edi, esi
jle 0x581a2d
mov dl, byte [eax]
xor byte [ebx + 0x655b50], dl
inc ebx
cmp ebx, 0x3ff
jl 0x581a27
xor ebx, ebx
inc esi
inc eax
cmp edi, esi
jg 0x581a14
add dword [ebp - 4], 0x14
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jl 0x581947
lea edx, [ebp - 0x44]
push edx
call fcn.00586408
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x581a63
push 0x137
push 0x62c148
push 0x12
push 9
call fcn.00548254
add esp, 0x10
xor esi, esi
mov edx, 0x655f63
lea eax, [ebp - 0x2c]
mov cl, byte [eax]
xor byte [edx], cl
inc esi
inc edx
inc eax
cmp esi, 0x14
jl 0x581a6d
fld qword [0x62c094]
fcomp dword [0x581abc]
fnstsw ax
sahf
jae 0x581a99
fld qword [ebp + 0x10]
fadd qword [0x62c094]
fstp qword [0x62c094]
cmp dword [ebp - 0x10], 0
jne 0x581ab5
push 0x142
push 0x62c160
push 0x12
push 0xa
call fcn.00548254
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret