Function at 0x401680
Capabilities:
Encode data using xor
Encrypt data using des

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x5dbcc8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x3f
mov esi, ecx
lea ecx, [ebp - 0x43]
push 0
push ecx
mov dword [ebp - 0x14c], eax
mov edi, edx
mov byte [ebp - 0x44], 0
call fcn.00549e40
add esp, 0xc
xor eax, eax
lea esp, [esp]
or cl, 0xff
mov edx, eax
sar edx, 3
mov dl, byte [edx + esi]
sub cl, al
and cl, 7
sar dl, cl
inc eax
and dl, 1
mov byte [ebp + eax - 0x45], dl
cmp eax, 0x40
jl 0x4016c0
push 0x100
lea eax, [ebp - 0x144]
push 0
push eax
call fcn.00549e40
add esp, 0xc
xor eax, eax
jmp 0x401700
movsx ecx, byte [eax + 0x5a4b90]
movzx edx, byte [ebp + ecx - 0x45]
movsx ecx, byte [eax + 0x5a4b91]
mov byte [ebp + eax - 0x144], dl
movzx edx, byte [ebp + ecx - 0x45]
movsx ecx, byte [eax + 0x5a4b92]
mov byte [ebp + eax - 0x143], dl
movzx edx, byte [ebp + ecx - 0x45]
movsx ecx, byte [eax + 0x5a4b93]
mov byte [ebp + eax - 0x142], dl
movzx edx, byte [ebp + ecx - 0x45]
mov byte [ebp + eax - 0x141], dl
add eax, 4
cmp eax, 0x40
jl 0x401700
push 0x40
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.0054a0c0
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x4017e9
mov ebx, edi
mov dword [ebp - 0x148], 0x10
jmp 0x401780
mov ecx, 8
lea esi, [ebp - 0x24]
lea edi, [ebp - 0x16c]
rep movsd dword es:[edi], dword [esi]
mov edi, ebx
lea esi, [ebp - 0x24]
call fcn.00401230
xor eax, eax
lea esp, [esp]
movzx edx, byte [ebp + eax - 0x44]
xor byte [ebp + eax - 0x24], dl
movzx ecx, byte [ebp + eax - 0x43]
xor byte [ebp + eax - 0x23], cl
movzx edx, byte [ebp + eax - 0x42]
xor byte [ebp + eax - 0x22], dl
movzx ecx, byte [ebp + eax - 0x41]
xor byte [ebp + eax - 0x21], cl
add eax, 4
cmp eax, 0x20
jl 0x4017a0
mov ecx, 8
lea esi, [ebp - 0x16c]
lea edi, [ebp - 0x44]
add ebx, 0x30
dec dword [ebp - 0x148]
rep movsd dword es:[edi], dword [esi]
jne 0x401780
jmp 0x401866
add edi, 0x2d0
mov ebx, 0xf
mov dword [ebp - 0x148], edi
lea ebx, [ebx]
mov ecx, 8
lea esi, [ebp - 0x24]
lea edi, [ebp - 0x16c]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x148]
lea esi, [ebp - 0x24]
call fcn.00401230
xor eax, eax
movzx edx, byte [ebp + eax - 0x44]
xor byte [ebp + eax - 0x24], dl
movzx ecx, byte [ebp + eax - 0x43]
xor byte [ebp + eax - 0x23], cl
movzx edx, byte [ebp + eax - 0x42]
xor byte [ebp + eax - 0x22], dl
movzx ecx, byte [ebp + eax - 0x41]
xor byte [ebp + eax - 0x21], cl
add eax, 4
cmp eax, 0x20
jl 0x401820
sub dword [ebp - 0x148], 0x30
dec ebx
mov ecx, 8
lea esi, [ebp - 0x16c]
lea edi, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
jns 0x401800
push 0x100
lea edx, [ebp - 0x144]
push 0
push edx
call fcn.00549e40
push 0x20
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x144]
push ecx
call fcn.0054a0c0
push 0x20
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x44]
push eax
call fcn.00545ed0
push 0x20
lea ecx, [ebp - 0x144]
push ecx
lea edx, [ebp - 0x24]
push edx
call fcn.0054a0c0
push 0x100
lea eax, [ebp - 0x144]
push 0
push eax
call fcn.00549e40
add esp, 0x3c
xor eax, eax
movsx ecx, byte [eax + 0x5a4bd0]
movzx edx, byte [ebp + ecx - 0x45]
movsx ecx, byte [eax + 0x5a4bd1]
mov byte [ebp + eax - 0x144], dl
movzx edx, byte [ebp + ecx - 0x45]
movsx ecx, byte [eax + 0x5a4bd2]
mov byte [ebp + eax - 0x143], dl
movzx edx, byte [ebp + ecx - 0x45]
movsx ecx, byte [eax + 0x5a4bd3]
mov byte [ebp + eax - 0x142], dl
movzx edx, byte [ebp + ecx - 0x45]
mov byte [ebp + eax - 0x141], dl
add eax, 4
cmp eax, 0x40
jl 0x4018c4
push 0x40
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.0054a0c0
mov edi, dword [ebp - 0x14c]
add esp, 0xc
lea edx, [ebp - 0x44]
call fcn.00401000
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00545eb2
mov esp, ebp
pop ebp
ret