Function at 0x785c1d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0x34
pop eax
call fcn.006f8060
push ebx
push esi
push edi
xor edi, edi
cmp dword [0xa17f9c], edi
mov esi, 0xb94148
je 0x785c70
push 0xd8
push esi
push 0x13
push 5
call fcn.00774ab7
call fcn.0077491b
xor ecx, ecx
cmp dword [0xa17fa0], eax
push 0xda
sete cl
push esi
push 0x13
push 6
mov dword [ebp - 4], ecx
call fcn.00774ab7
add esp, 0x20
jmp 0x785c73
mov dword [ebp - 4], edi
cmp dword [ebp - 4], edi
jne 0x785c8a
push 0xdf
push esi
push 0x12
push 9
call fcn.00774ab7
add esp, 0x10
mov ecx, dword [0xa17f88]
mov eax, dword [0xa17f84]
mov dword [ebp - 0x10], ecx
mov ecx, dword [0xa17f8c]
mov dword [ebp - 0xc], ecx
push 5
pop ecx
mov esi, 0xa17f6c
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0xc]
mov ebx, eax
add eax, esi
mov ecx, 0x3ff
cmp eax, ecx
mov dword [0xa17f84], eax
jl 0x785cd6
cdq
mov edi, ecx
idiv edi
mov dword [0xa17f80], ecx
mov dword [0xa17f84], edx
jmp 0x785ce9
mov edx, dword [0xa17f80]
cmp edx, ecx
jge 0x785ce9
cmp eax, edx
jle 0x785ce9
mov dword [0xa17f80], eax
mov eax, esi
cdq
push 0x14
pop ecx
idiv ecx
mov edi, eax
xor eax, eax
test edx, edx
setg al
add eax, edi
add dword [0xa17f8c], eax
cmp dword [ebp - 4], 0
jne 0x785d1e
push 0xff
push 0xb94148
push 0x12
push 0xa
call fcn.00774ab7
add esp, 0x10
lea eax, [ebp - 0x20]
push eax
call fcn.00778c66
test esi, esi
pop ecx
jle 0x785e18
push 0x14
xor edx, edx
lea eax, [esi - 1]
pop ecx
div ecx
mov dword [ebp + 0xc], esi
inc eax
mov dword [ebp - 8], eax
mov esi, dword [ebp + 0xc]
cmp esi, 0x14
jle 0x785d4c
push 0x14
pop esi
push 0
call fcn.00779b8d
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00778c73
push 0x14
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00778d73
lea edi, [esi + ebx - 0x3ff]
add esp, 0x18
test edi, edi
jle 0x785da3
mov eax, esi
sub eax, edi
push eax
lea eax, [ebx + 0xa17b58]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00778d73
push edi
lea eax, [ebp - 0x20]
push 0xa17b58
push eax
call fcn.00778d73
add esp, 0x18
jmp 0x785db7
push esi
lea eax, [ebx + 0xa17b58]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00778d73
add esp, 0xc
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x20]
push eax
call fcn.00778d73
push 8
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00778d73
push 0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00778d89
add dword [ebp + 8], esi
add esp, 0x24
inc dword [ebp - 0xc]
xor eax, eax
test esi, esi
jle 0x785e0b
mov cl, byte [ebp + eax - 0x34]
xor byte [ebx + 0xa17b58], cl
inc ebx
cmp ebx, 0x3ff
jl 0x785e06
xor ebx, ebx
inc eax
cmp eax, esi
jl 0x785df1
sub dword [ebp + 0xc], 0x14
dec dword [ebp - 8]
jne 0x785d41
lea eax, [ebp - 0x20]
push eax
call fcn.00778dfb
cmp dword [ebp - 4], 0
pop ecx
pop edi
pop esi
pop ebx
jne 0x785e41
push 0x12a
push 0xb94148
push 0x12
push 9
call fcn.00774ab7
add esp, 0x10
xor eax, eax
mov cl, byte [ebp + eax - 0x34]
xor byte [eax + 0xa17f6c], cl
inc eax
cmp eax, 0x14
jl 0x785e43
fld qword [0xa17f90]
fcomp qword [0xb94140]
fnstsw ax
test ah, 5
jp 0x785e75
fld qword [0xa17f90]
fadd qword [ebp + 0x10]
fstp qword [0xa17f90]
cmp dword [ebp - 4], 0
jne 0x785e91
push 0x135
push 0xb94148
push 0x12
push 0xa
call fcn.00774ab7
add esp, 0x10
leave
ret