Function at 0x58af7a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [0x3014a4d4]
mov dword [ebp - 0x10], eax
movzx eax, word [ebx]
push edi
mov edi, dword [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call esi
test eax, eax
pop ecx
je 0x58afb3
inc ebx
inc ebx
movzx eax, word [ebx]
push eax
call esi
test eax, eax
pop ecx
jne 0x58afa3
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x10]
movzx eax, word [ebx]
push eax
call esi
test eax, eax
pop ecx
je 0x58afd1
inc ebx
inc ebx
movzx eax, word [ebx]
push eax
call esi
test eax, eax
pop ecx
jne 0x58afc1
mov dword [ebp - 0x10], ebx
push ebx
mov ebx, dword [0x3014a4e0]
call ebx
push dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
call ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
test eax, eax
pop ecx
pop ecx
jbe 0x58b013
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + eax*2 - 2]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
push eax
call esi
test eax, eax
pop ecx
je 0x58b013
dec dword [ebp - 0xc]
sub dword [ebp - 8], 2
cmp dword [ebp - 0xc], 0
ja 0x58aff8
mov eax, dword [ebp - 4]
test eax, eax
jbe 0x58b03f
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + eax*2 - 2]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
push eax
call esi
test eax, eax
pop ecx
je 0x58b03f
dec dword [ebp - 4]
sub dword [ebp - 8], 2
cmp dword [ebp - 4], 0
ja 0x58b024
push dword [edi + 0x38]
call ebx
mov ecx, dword [edi + 0x18]
mov ebx, eax
mov eax, dword [ebp - 4]
add eax, ebx
add eax, dword [ebp - 0xc]
lea eax, [ecx + eax*2 + 9]
and eax, 0xfffffffc
add eax, 0xa8
push eax
mov dword [ebp - 8], eax
call dword [0x3014a62c]
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x58b20e
push 0x30
push edi
push esi
call 0x63928a
mov eax, dword [ebp - 8]
mov dword [esi], eax
lea eax, [esi + 0xa8]
sub eax, esi
mov word [esi + 0x38], ax
add ebx, ebx
lea eax, [ebx + 2]
push eax
push dword [edi + 0x38]
lea eax, [esi + 0xa8]
push eax
call 0x63928a
lea ebx, [esi + ebx + 0xaa]
mov eax, ebx
sub eax, esi
mov word [esi + 0x3a], ax
mov eax, dword [ebp - 0xc]
add eax, eax
push eax
push dword [ebp - 0x10]
push ebx
call 0x63928a
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
and ecx, 0x3f
mov cx, word [ecx*2 + 0x301b83b8]
add eax, eax
add eax, ebx
mov word [eax], cx
xor ecx, ecx
add esp, 0x24
cmp dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
jbe 0x58b102
lea edx, [ebx + ecx*2]
and ecx, 0x3f
mov cx, word [ecx*2 + 0x301b83b8]
xor word [edx], cx
mov ecx, dword [ebp - 8]
inc ecx
cmp ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
jb 0x58b0e5
lea ebx, [eax + 2]
mov eax, ebx
sub eax, esi
mov word [esi + 0x3c], ax
mov eax, dword [ebp - 4]
add eax, eax
push eax
push dword [ebp - 0x14]
push ebx
call 0x63928a
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
add eax, eax
and ecx, 0x3f
mov cx, word [ecx*2 + 0x301b83b8]
xor edx, edx
add eax, ebx
add esp, 0xc
cmp dword [ebp - 4], edx
mov word [eax], cx
mov dword [ebp - 8], edx
jbe 0x58b15e
lea ecx, [ebx + edx*2]
and edx, 0x3f
mov dx, word [edx*2 + 0x301b83b8]
xor word [ecx], dx
mov edx, dword [ebp - 8]
inc edx
cmp edx, dword [ebp - 4]
mov dword [ebp - 8], edx
jb 0x58b141
add eax, 2
mov ecx, eax
sub ecx, esi
mov word [esi + 0x3e], cx
push dword [edi + 0x18]
push dword [edi + 0x30]
push eax
call 0x63928a
add esp, 0xc
cmp dword [edi + 4], 4
jge 0x58b1af
push 0x1c
lea eax, [ebp - 0x30]
push eax
push dword [edi + 0x3c]
call dword [0x3014a1cc]
test eax, eax
je 0x58b1af
push dword [ebp - 0x2c]
lea eax, [esi + 0x40]
push 0x3016b040
push 0x14
push eax
call dword [0x3014a520]
add esp, 0x10
and word [esi + 0x66], 0
jmp 0x58b1b4
and word [esi + 0x40], 0
mov ebx, dword [0x3014a650]
push 0x5c
push dword [edi + 0x34]
call ebx
push 0x2f
push dword [edi + 0x34]
mov dword [ebp - 4], eax
call ebx
add esp, 0x10
cmp dword [ebp - 4], eax
ja 0x58b1d6
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x58b1e4
mov eax, dword [edi + 0x34]
mov dword [ebp - 4], eax
jmp 0x58b1e8
add dword [ebp - 4], 2
push 0x20
push dword [ebp - 4]
lea eax, [esi + 0x68]
push eax
call dword [0x3014a6cc]
and word [esi + 0xa6], 0
mov ecx, dword [0x3027a07c]
add esp, 0xc
push esi
call fcn.0058aec4
pop edi
pop esi
pop ebx
leave
ret