Function at 0x58ba20
Capabilities:
Encode data using xor
Encrypt data using twofish

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b5b68
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
push str.initCrypt_twofish
mov dword [ebp - 0x4c], ecx
push ebx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x60], eax
call fcn.0044ec60
mov eax, dword [edi + 0x10]
cdq
and edx, 7
lea esi, [edx + eax]
lea ecx, [edi + 0x14]
mov dword [ebp - 4], 0
sar esi, 3
call fcn.00410b80
lea ecx, [edi + 0x14]
mov dword [ebp - 0x50], eax
call fcn.00410b60
cmp eax, esi
jae 0x58baba
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
push str.Not_enough_key_material_for_twofish.
mov ecx, ebx
call eax
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
xor al, al
jmp 0x58bfaa
mov eax, esi
cdq
and edx, 7
lea edi, [edx + eax]
sar edi, 3
mov dword [ebp - 0x54], edi
test esi, esi
jle 0x58bade
mov ecx, dword [ebp - 0x50]
push esi
push ecx
lea edx, [ebp - 0x40]
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
test edi, edi
jle 0x58bb6b
lea esi, [ebp - 0x1e]
lea ecx, [ebp - 0x3a]
mov edx, edi
mov edi, edi
movzx eax, byte [ecx + 1]
mov eax, dword [eax*4 + 0x646170]
movzx ebx, byte [ecx - 1]
xor eax, dword [ebx*4 + 0x645970]
movzx ebx, byte [ecx - 2]
xor eax, dword [ebx*4 + 0x645570]
movzx ebx, byte [ecx - 3]
xor eax, dword [ebx*4 + 0x645170]
movzx ebx, byte [ecx - 4]
xor eax, dword [ebx*4 + 0x644d70]
movzx ebx, byte [ecx - 5]
xor eax, dword [ebx*4 + 0x644970]
movzx ebx, byte [ecx - 6]
xor eax, dword [ebx*4 + 0x644570]
movzx ebx, byte [ecx]
xor eax, dword [ebx*4 + 0x645d70]
add esi, 4
mov ebx, eax
shr ebx, 0x18
mov byte [esi - 3], bl
mov ebx, eax
shr ebx, 0x10
mov byte [esi - 4], bl
mov ebx, eax
shr ebx, 8
mov byte [esi - 5], bl
mov byte [esi - 6], al
add ecx, 8
dec edx
jne 0x58baf0
mov ecx, dword [ebp - 0x4c]
add ecx, 0x108c
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x50], ecx
jmp 0x58bb83
mov edi, dword [ebp - 0x54]
mov bl, byte [ebp - 0x58]
add bl, bl
push edi
xor eax, eax
lea ecx, [ebp - 0x40]
lea esi, [ebp - 0x48]
lea edx, [ebp - 0x44]
mov byte [ebp - 0x44], bl
mov byte [ebp - 0x43], bl
mov byte [ebp - 0x42], bl
mov byte [ebp - 0x41], bl
call fcn.0058b880
movzx edi, byte [ebp - 0x45]
movzx edx, byte [ebp - 0x46]
mov eax, dword [ebp - 0x48]
shl edi, 8
or edi, edx
movzx ecx, ah
shl edi, 8
movzx edx, al
mov eax, dword [ebp - 0x54]
or edi, ecx
inc bl
shl edi, 8
or edi, edx
push eax
mov eax, 1
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x44]
mov byte [ebp - 0x44], bl
mov byte [ebp - 0x43], bl
mov byte [ebp - 0x42], bl
mov byte [ebp - 0x41], bl
call fcn.0058b880
movzx eax, byte [ebp - 0x45]
movzx ecx, byte [ebp - 0x46]
shl eax, 8
or eax, ecx
mov ecx, dword [ebp - 0x48]
shl eax, 8
movzx edx, ch
or eax, edx
shl eax, 8
movzx ecx, cl
or eax, ecx
mov ecx, dword [ebp - 0x50]
add esp, 8
rol eax, 8
lea edx, [eax + edi]
lea eax, [edi + eax*2]
rol eax, 9
mov dword [ecx], eax
mov eax, dword [ebp - 0x58]
inc eax
mov dword [ecx - 4], edx
add ecx, 8
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], ecx
cmp eax, 0x14
jl 0x58bb80
mov eax, dword [ebp - 0x54]
xor esi, esi
cmp eax, 2
jne 0x58bd1b
mov eax, dword [ebp - 0x4c]
add eax, 0x488
lea ebx, [ebx]
movzx edi, byte [ebp - 0x20]
mov ecx, esi
and ecx, 0xff
mov dl, byte [ecx + 0x643370]
mov cl, byte [ecx + 0x643470]
movzx edx, dl
mov ebx, edx
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x1c]
xor ebx, edi
movzx edi, byte [ebx + 0x643470]
mov edi, dword [edi*4 + 0x643570]
mov dword [eax - 0x400], edi
movzx edi, byte [ebp - 0x1f]
movzx ecx, cl
mov ebx, ecx
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x1b]
xor ebx, edi
movzx edi, byte [ebx + 0x643370]
mov edi, dword [edi*4 + 0x643970]
mov dword [eax], edi
movzx edi, byte [ebp - 0x1e]
xor edi, edx
movzx edi, byte [edi + 0x643470]
movzx edx, byte [ebp - 0x1a]
xor edi, edx
movzx edx, byte [edi + 0x643470]
mov edx, dword [edx*4 + 0x643d70]
mov dword [eax + 0x400], edx
movzx edx, byte [ebp - 0x1d]
xor edx, ecx
movzx edx, byte [edx + 0x643470]
movzx ecx, byte [ebp - 0x19]
xor edx, ecx
movzx ecx, byte [edx + 0x643370]
mov edx, dword [ecx*4 + 0x644170]
mov dword [eax + 0x800], edx
inc esi
add eax, 4
cmp esi, 0x100
jl 0x58bc50
jmp 0x58bf5a
cmp eax, 3
mov eax, dword [ebp - 0x4c]
jne 0x58be2b
add eax, 0x488
lea esp, [esp]
movzx edi, byte [ebp - 0x20]
mov ecx, esi
and ecx, 0xff
mov dl, byte [ecx + 0x643370]
movzx ecx, byte [ecx + 0x643470]
mov ebx, ecx
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x1c]
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x18]
xor ebx, edi
movzx edi, byte [ebx + 0x643470]
mov edi, dword [edi*4 + 0x643570]
mov dword [eax - 0x400], edi
movzx edi, byte [ebp - 0x1f]
xor ecx, edi
movzx edi, byte [ecx + 0x643470]
movzx ecx, byte [ebp - 0x1b]
xor edi, ecx
movzx edi, byte [edi + 0x643370]
movzx ecx, byte [ebp - 0x17]
xor edi, ecx
movzx ecx, byte [edi + 0x643370]
mov ecx, dword [ecx*4 + 0x643970]
mov dword [eax], ecx
movzx ecx, dl
movzx edx, byte [ebp - 0x1e]
xor edx, ecx
movzx edi, byte [edx + 0x643370]
movzx edx, byte [ebp - 0x1a]
xor edi, edx
movzx edi, byte [edi + 0x643470]
movzx edx, byte [ebp - 0x16]
xor edi, edx
movzx edx, byte [edi + 0x643470]
mov edx, dword [edx*4 + 0x643d70]
mov dword [eax + 0x400], edx
movzx edx, byte [ebp - 0x1d]
xor edx, ecx
movzx edx, byte [edx + 0x643470]
movzx ecx, byte [ebp - 0x19]
xor edx, ecx
movzx edx, byte [edx + 0x643470]
movzx ecx, byte [ebp - 0x15]
xor edx, ecx
movzx ecx, byte [edx + 0x643370]
mov edx, dword [ecx*4 + 0x644170]
mov dword [eax + 0x800], edx
inc esi
add eax, 4
cmp esi, 0x100
jl 0x58bd30
jmp 0x58bf5a
add eax, 0x488
movzx edi, byte [ebp - 0x20]
mov ecx, esi
and ecx, 0xff
mov dl, byte [ecx + 0x643370]
movzx ecx, byte [ecx + 0x643470]
mov ebx, ecx
xor ebx, edi
movzx ebx, byte [ebx + 0x643470]
movzx edi, byte [ebp - 0x1c]
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x18]
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x14]
xor ebx, edi
movzx edi, byte [ebx + 0x643470]
mov edi, dword [edi*4 + 0x643570]
mov dword [eax - 0x400], edi
movzx edi, byte [ebp - 0x1f]
movzx edx, dl
xor edi, edx
movzx ebx, byte [edi + 0x643470]
movzx edi, byte [ebp - 0x1b]
xor ebx, edi
movzx ebx, byte [ebx + 0x643470]
movzx edi, byte [ebp - 0x17]
xor ebx, edi
movzx ebx, byte [ebx + 0x643370]
movzx edi, byte [ebp - 0x13]
xor ebx, edi
movzx edi, byte [ebx + 0x643370]
mov edi, dword [edi*4 + 0x643970]
mov dword [eax], edi
movzx edi, byte [ebp - 0x1e]
xor edi, edx
movzx edi, byte [edi + 0x643370]
movzx edx, byte [ebp - 0x1a]
xor edi, edx
movzx edi, byte [edi + 0x643370]
movzx edx, byte [ebp - 0x16]
xor edi, edx
movzx edi, byte [edi + 0x643470]
movzx edx, byte [ebp - 0x12]
xor edi, edx
movzx edx, byte [edi + 0x643470]
mov edx, dword [edx*4 + 0x643d70]
mov dword [eax + 0x400], edx
movzx edx, byte [ebp - 0x1d]
xor edx, ecx
movzx edx, byte [edx + 0x643370]
movzx ecx, byte [ebp - 0x19]
xor edx, ecx
movzx edx, byte [edx + 0x643470]
movzx ecx, byte [ebp - 0x15]
xor edx, ecx
movzx edx, byte [edx + 0x643470]
movzx ecx, byte [ebp - 0x11]
xor edx, ecx
movzx ecx, byte [edx + 0x643370]
mov edx, dword [ecx*4 + 0x644170]
mov dword [eax + 0x800], edx
inc esi
add eax, 4
cmp esi, 0x100
jl 0x58be30
mov edi, dword [ebp - 0x60]
test edi, edi
je 0x58bf99
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ecx + 8]
cmp eax, 3
je 0x58bf71
cmp eax, 4
jne 0x58bf99
mov eax, dword [ebp - 0x4c]
lea esi, [ecx + 0x34]
mov ecx, dword [eax + 0x80]
push ecx
mov ecx, esi
call fcn.00410b60
push eax
mov ecx, esi
call fcn.00410b80
push eax
lea ecx, [edi + 0x484]
call fcn.00529480
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0xffffffff
call fcn.0044ecf0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 0x10