Function at 0x4016d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebp, edi
mov dword [esp + 0x1c], edi
sub ebp, esi
mov dword [esp + 0x3c], esi
mov dl, 0x10
mov dword [esp + 0x24], ebp
lea eax, [edi + 0x10]
mov dword [esp + 0x20], eax
lea ebx, [esi + 0x10]
mov eax, edi
mov dword [esp + 0x40], ebx
sub eax, esi
mov ecx, ebx
add eax, 0x50
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
sub eax, esi
mov dword [esp + 0x20], eax
mov ebx, eax
nop dword [eax + eax]
mov al, byte [ecx + ebp + 0x3f]
lea ecx, [ecx - 1]
mov byte [ecx + ebp], al
xor byte [ecx], al
mov al, byte [edi + ecx]
mov byte [ebx + ecx], al
add dl, 0xff
jne 0x401720
mov cl, byte [esi + 1]
mov al, byte [esi + 0xd]
mov byte [esi + 1], al
mov al, byte [esi + 9]
mov byte [esi + 0xd], al
mov al, byte [esi + 5]
mov byte [esi + 9], al
mov al, byte [esi + 0xa]
mov byte [esi + 5], cl
mov cl, byte [esi + 2]
mov byte [esi + 2], al
mov al, byte [esi + 7]
mov byte [esi + 0xa], cl
mov cl, byte [esi + 3]
mov byte [esi + 3], al
mov al, byte [esi + 0xb]
mov byte [esi + 7], al
mov al, byte [esi + 0xf]
mov byte [esi + 0xf], cl
mov cl, byte [esi + 6]
mov byte [esi + 0xb], al
mov al, byte [esi + 0xe]
mov byte [esi + 0xe], cl
mov ecx, esi
mov byte [esi + 6], al
call fcn.00401330
mov edi, dword [esp + 0x1c]
lea ebx, [esi + 0x10]
mov al, 0xd
mov byte [esp + 0x12], 0x80
mov byte [esp + 0x13], al
test al, 1
je 0x4018f4
lea eax, [edi - 3]
mov dword [esp + 0x14], 3
sub eax, edi
lea edx, [edi - 4]
mov dword [esp + 0x18], eax
lea ebx, [edi + 1]
lea eax, [edi - 2]
sub ebx, edi
sub eax, edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], eax
lea ebp, [edi + 2]
sub ebp, edi
lea eax, [edi - 1]
lea esi, [edi + 3]
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x18]
lea ecx, [edi + 0x1c]
sub eax, edi
sub edx, edi
sub esi, edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], esi
mov edi, ebx
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x30]
mov al, byte [edx + ecx]
lea ecx, [ecx - 4]
xor byte [ecx + 4], al
mov al, byte [ecx + ebp + 4]
xor byte [edi + ecx + 4], al
mov al, byte [esi + ecx + 4]
xor byte [ebx + ecx + 4], al
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov al, byte [eax + ecx + 4]
xor byte [ecx + ebp + 4], al
sub dword [esp + 0x14], 1
mov ebp, dword [esp + 0x18]
jne 0x4017f4
mov edi, dword [esp + 0x1c]
mov cl, byte [edi + 0xc]
call fcn.004012c0
mov cl, byte [edi + 0xd]
xor byte [edi + 0x10], al
call fcn.004012c0
mov cl, byte [edi + 0xe]
xor byte [edi + 0x11], al
call fcn.004012c0
mov cl, byte [edi + 0xf]
xor byte [edi + 0x12], al
call fcn.004012c0
xor byte [edi + 0x13], al
mov dl, 0xc
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
movzx ecx, dl
mov al, byte [ecx + edi - 4]
xor byte [ecx + edi], al
mov al, byte [ecx + edi - 3]
xor byte [edi + ecx + 1], al
mov al, byte [ecx + edi - 2]
xor byte [edi + ecx + 2], al
lea eax, [edi - 1]
mov al, byte [ecx + eax]
xor byte [edi + ecx + 3], al
add dl, 0xfc
jne 0x401862
mov cl, byte [esp + 0x12]
mov al, cl
and al, 1
neg al
sbb al, al
shr cl, 1
and al, 0x8d
xor cl, al
mov byte [esp + 0x12], cl
mov cl, byte [edi + 0x1d]
call fcn.004012c0
xor al, byte [edi]
xor al, byte [esp + 0x12]
mov cl, byte [edi + 0x1e]
mov byte [edi], al
call fcn.004012c0
mov cl, byte [edi + 0x1f]
xor byte [edi + 1], al
call fcn.004012c0
mov cl, byte [edi + 0x1c]
xor byte [edi + 2], al
call fcn.004012c0
xor byte [edi + 3], al
mov dl, 0x10
mov ebp, dword [esp + 0x20]
mov ecx, ebx
nop word [eax + eax]
mov al, byte [ecx + ebp - 1]
lea ecx, [ecx - 1]
xor byte [ecx], al
add dl, 0xff
jne 0x4018e0
mov ebp, dword [esp + 0x24]
jmp 0x401904
mov dl, 0x10
mov eax, ebx
mov cl, byte [eax + ebp - 1]
dec eax
xor byte [eax], cl
add dl, 0xff
jne 0x4018f8
mov ecx, esi
call fcn.004013c0
mov cl, byte [esi + 1]
mov al, byte [esi + 0xd]
mov byte [esi + 1], al
mov al, byte [esi + 9]
mov byte [esi + 0xd], al
mov al, byte [esi + 5]
mov byte [esi + 9], al
mov al, byte [esi + 0xa]
mov byte [esi + 5], cl
mov cl, byte [esi + 2]
mov byte [esi + 2], al
mov al, byte [esi + 7]
mov byte [esi + 0xa], cl
mov cl, byte [esi + 3]
mov byte [esi + 3], al
mov al, byte [esi + 0xb]
mov byte [esi + 7], al
mov al, byte [esi + 0xf]
mov byte [esi + 0xf], cl
mov cl, byte [esi + 6]
mov byte [esi + 0xb], al
mov al, byte [esi + 0xe]
mov byte [esi + 0xe], cl
mov ecx, esi
mov byte [esi + 6], al
call fcn.00401330
mov al, byte [esp + 0x13]
add al, 0xff
mov byte [esp + 0x13], al
jne 0x401798
mov cl, 0x10
nop dword [eax]
mov al, byte [ebx + ebp - 1]
lea ebx, [ebx - 1]
xor byte [ebx], al
add cl, 0xff
jne 0x401970
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret