Function at 0x4012f5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [0x40725c], esi
mov dword [0x40727c], ebx
mov dword [0x40729c], ebx
mov eax, dword [esi + 4]
mov dword [0x40724c], eax
mov ecx, dword [esi + 8]
mov dword [0x407288], ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi + 0x14]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], ecx
mov cx, word [esi + 2]
mov word [0x4072b4], cx
mov ecx, dword [0x4072bc]
push edi
mov dword [ebp - 4], ebx
mov dword [ecx + 0x1828], eax
mov eax, dword [0x4072bc]
mov dword [eax + 0x182c], ebx
mov eax, dword [0x4072bc]
mov ecx, dword [0x407288]
mov dword [eax + 0x1830], ecx
mov eax, dword [0x40725c]
mov ecx, dword [0x4072bc]
mov ax, word [eax]
mov word [ecx + 0x1834], ax
mov eax, dword [esi + 8]
mov dword [0x407258], eax
mov eax, dword [0x40725c]
mov dword [0x407264], ebx
mov dword [0x407244], ebx
mov dword [0x407278], ebx
mov dword [0x407280], ebx
mov dword [0x407250], ebx
test byte [eax + 2], 1
je 0x4013b8
mov dword [0x407250], 1
or dword [0x407268], 0xffffffff
cmp dword [0x407250], ebx
mov dword [0x4072a4], ebx
mov dword [0x4072b8], ebx
mov dword [0x4072a0], ebx
mov dword [0x407254], ebx
je 0x401473
mov dword [0x407250], ebx
xor edi, edi
call fcn.004015bd
mov byte [ebp + edi - 0x1c], al
inc edi
cmp edi, 0xc
jl 0x4013eb
mov eax, dword [0x40725c]
mov dword [0x407250], 1
mov cx, word [eax + 0xe]
push ecx
push dword [eax + 0x14]
mov ax, word [eax + 2]
push eax
call fcn.00401053
lea eax, [ebp - 0x1c]
push eax
call fcn.0040102f
lea edi, [esi + 0x18]
push edi
call fcn.00401043
add esp, 0x14
call fcn.00401133
test eax, eax
je 0x401528
mov eax, dword [0x407264]
push edi
mov dword [ebp + 8], eax
call fcn.00401073
mov eax, dword [ebp + 8]
mov edi, dword [0x40728c]
cmp eax, ebx
pop ecx
jle 0x401473
mov dword [ebp + 8], eax
call fcn.00401083
xor byte [edi], al
movzx eax, byte [edi]
push eax
call fcn.0040109c
inc edi
dec dword [ebp + 8]
pop ecx
jne 0x40145c
push ebx
call fcn.00404306
mov eax, dword [0x40725c]
pop ecx
mov edi, 0x30000006
movzx eax, word [eax]
cmp eax, ebx
je 0x40154e
jle 0x401542
cmp eax, 6
jle 0x401542
cmp eax, 8
jne 0x401542
call fcn.00402a9c
cmp dword [0x40729c], ebx
jne 0x4014bd
cmp eax, ebx
mov dword [0x40729c], eax
je 0x4014c9
cmp dword [0x40729c], edi
jne 0x401560
test byte [esi + 2], 8
je 0x401560
lea eax, [ebp - 0x10]
push 0xc
push eax
push dword [0x407234]
call fcn.00401cce
add esp, 0xc
cmp eax, 0xc
je 0x4014fd
push dword [0x407234]
call fcn.00401d50
pop ecx
mov dword [0x40729c], eax
cmp dword [ebp - 0x10], 0x8074b50
jne 0x401560
mov eax, dword [ebp - 0xc]
push 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push dword [0x407234]
call fcn.00401cce
add esp, 0xc
jmp 0x401560
mov eax, dword [0x40727c]
neg eax
sbb eax, eax
and eax, 4
add eax, 0x20000004
mov dword [0x40729c], eax
xor eax, eax
jmp 0x4015b8
mov dword [0x40729c], 0x2000000a
jmp 0x4015a0
call fcn.00401b75
cmp dword [0x40729c], ebx
jne 0x401568
mov dword [0x40729c], eax
cmp dword [0x40729c], ebx
je 0x401570
cmp dword [0x40729c], edi
jne 0x4015a0
mov eax, dword [0x407268]
mov dword [ebp - 4], 1
not eax
cmp eax, dword [ebp - 0x10]
mov dword [0x407268], eax
je 0x4015a0
xor eax, eax
cmp dword [0x407250], ebx
mov dword [ebp - 4], ebx
setne al
add eax, 0x20000003
mov dword [0x40729c], eax
cmp dword [0x40727c], ebx
je 0x4015b5
mov dword [0x40729c], 0x20000008
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret