Function at 0x4de410
Capabilities:
Encrypt data using twofish

Disassembly:
push 0xffffffffffffffff
push 0x627468
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6e377c]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebp, ecx
mov ebx, dword [esp + 0x44]
cmp ebx, 0x10
ja 0x4de44c
mov dword [esp + 0x44], 2
jmp 0x4de45e
mov eax, 0x18
cmp eax, ebx
sbb eax, eax
neg eax
add eax, 3
mov dword [esp + 0x44], eax
mov edi, dword [esp + 0x44]
add edi, edi
push edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x2c], edi
call fcn.004db9d0
add esp, 4
test edi, edi
jne 0x4de481
xor esi, esi
mov dword [esp + 0x14], esi
jmp 0x4de497
lea ecx, [edi*4]
push ecx
call fcn.004dadd0
add esp, 4
mov dword [esp + 0x14], eax
mov esi, eax
mov dword [esp + 0x2c], esi
mov edx, dword [esp + 0x40]
push ebx
add edi, edi
push edx
add edi, edi
mov dword [esp + 0x40], 0
push edi
push esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 4
call fcn.005b4ddc
sub edi, ebx
push edi
add ebx, esi
push 0
push ebx
call fcn.005b79e0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x40]
call fcn.004ddd10
add esp, 0x20
xor ebx, ebx
jmp 0x4de4e6
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
push ecx
mov eax, ebx
call fcn.004de2c0
mov edx, eax
mov ecx, eax
shr edx, 0x18
mov edi, dword [edx*4 + str.9g]
shr ecx, 0x10
movzx ecx, cl
xor edi, dword [ecx*4 + 0x67d0b0]
mov edx, eax
shr edx, 8
movzx ecx, dl
xor edi, dword [ecx*4 + 0x67ccb0]
movzx edx, al
mov eax, dword [esp + 0x48]
xor edi, dword [edx*4 + 0x67c8b0]
push eax
lea eax, [ebx + 1]
add esi, 4
call fcn.004de2c0
mov edx, eax
shr edx, 0x10
mov ecx, eax
shr ecx, 0x18
mov ecx, dword [ecx*4 + str.9g]
movzx edx, dl
xor ecx, dword [edx*4 + 0x67d0b0]
mov edx, eax
shr edx, 8
movzx edx, dl
xor ecx, dword [edx*4 + 0x67ccb0]
movzx eax, al
xor ecx, dword [eax*4 + 0x67c8b0]
mov eax, dword [ebp + 0xbc]
add esp, 8
rol ecx, 8
lea edx, [ecx + edi]
mov dword [eax + ebx*4], edx
mov eax, dword [ebp + 0xbc]
lea edi, [edi + ecx*2]
rol edi, 9
mov dword [eax + ebx*4 + 4], edi
add ebx, 2
cmp ebx, 0x28
jb 0x4de4e2
mov esi, dword [esp + 0x18]
push esi
call fcn.004db9d0
xor edi, edi
add esp, 4
cmp esi, edi
jne 0x4de5b1
mov dword [esp + 0x40], edi
jmp 0x4de5c5
lea eax, [esi*4]
push eax
call fcn.004dadd0
add esp, 4
mov dword [esp + 0x40], eax
mov esi, dword [esp + 0x44]
cmp esi, edi
jbe 0x4de5fa
mov ecx, dword [esp + 0x40]
lea ebx, [ecx + esi*8 - 8]
mov eax, dword [esp + 0x14]
mov edx, dword [eax + edi*8 + 4]
add eax, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + edi*8]
push edx
call fcn.004de000
mov dword [ebx], eax
inc edi
add esp, 4
sub ebx, 8
cmp edi, esi
jb 0x4de5d5
xor ebx, ebx
mov edi, 0x800
jmp 0x4de607
mov esi, dword [esp + 0x44]
push esi
mov esi, dword [esp + 0x44]
mov eax, ebx
call fcn.004de2c0
mov ecx, dword [ebp + 0x10cc]
movzx edx, al
mov edx, dword [edx*4 + 0x67c8b0]
mov dword [ecx + edi - 0x800], edx
mov esi, dword [ebp + 0x10cc]
mov ecx, eax
shr ecx, 8
movzx edx, cl
mov ecx, dword [edx*4 + 0x67ccb0]
mov dword [esi + edi - 0x400], ecx
mov esi, dword [ebp + 0x10cc]
mov edx, eax
shr edx, 0x10
movzx ecx, dl
mov edx, dword [ecx*4 + 0x67d0b0]
mov dword [esi + edi], edx
mov ecx, dword [ebp + 0x10cc]
shr eax, 0x18
mov eax, dword [eax*4 + str.9g]
mov dword [ecx + edi + 0x400], eax
add edi, 4
add esp, 4
inc ebx
cmp edi, 0xc00
jb 0x4de603
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x18]
mov edi, edx
xor eax, eax
mov ecx, esi
push edx
rep stosd dword es:[edi], eax
call fcn.005b5a6b
mov edx, dword [esp + 0x18]
mov edi, edx
xor eax, eax
mov dword [esp + 0x3c], 0xffffffff
mov ecx, esi
push edx
rep stosd dword es:[edi], eax
call fcn.005b5a6b
add esp, 8
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0xc