Function at 0x403660
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
mov eax, dword [0x426050]
xor eax, esp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
push ebx
mov ebx, dword [esp + 0x38]
push esi
push edi
mov edi, ecx
cmp dword [edi], 0
mov esi, edx
je 0x40369b
pop edi
pop esi
mov eax, 0xfffffffb
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040ac69
add esp, 0x2c
ret 8
cmp dword [edi + 8], 1
je 0x4036ba
pop edi
pop esi
mov eax, 0xfffffffa
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040ac69
add esp, 0x2c
ret 8
test esi, esi
je 0x4038c7
test eax, eax
jle 0x4038c7
mov ecx, eax
and ecx, 0x8000000f
jns 0x4036d9
dec ecx
or ecx, 0xfffffff0
inc ecx
je 0x4036f4
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040ac69
add esp, 0x2c
ret 8
mov ecx, dword [edi + 4]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
sub ecx, 0
push ebp
mov dword [esp + 0x10], eax
je 0x403852
sub ecx, 1
je 0x40372b
pop ebp
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040ac69
add esp, 0x2c
ret 8
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x18]
mov ebp, dword [edi + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
add eax, 0xffffffff
test eax, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
jle 0x4037c2
lea edx, [esp + 0x28]
push edx
push esi
call fcn.00403bc0
mov edx, dword [esp + 0x1c]
xor dword [esp + 0x30], edx
mov edx, dword [esp + 0x20]
xor dword [esp + 0x34], edx
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x2c]
xor ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
xor eax, ebp
mov ebp, dword [esi]
mov dword [esp + 0x18], edx
mov edx, dword [esi + 8]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0xc]
mov dword [ebx], eax
mov eax, dword [esp + 0x30]
mov dword [ebx + 4], ecx
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x34]
sub eax, 1
mov dword [ebx + 0xc], ecx
add esi, 0x10
add ebx, 0x10
test eax, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
jg 0x403752
lea edx, [esp + 0x28]
push edx
push esi
call fcn.00403bc0
mov eax, dword [esp + 0x18]
xor dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
xor eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
xor dword [esp + 0x28], ebp
xor dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
shr eax, 0x18
mov esi, eax
lea edx, [esi - 1]
cmp edx, 0xf
ja 0x4038ad
mov ecx, 0x10
sub ecx, esi
mov eax, ecx
cmp eax, 0x10
jge 0x403825
lea esp, [esp]
movzx edx, byte [esp + eax + 0x28]
cmp edx, esi
jne 0x4038ad
add eax, 1
cmp eax, 0x10
jl 0x403810
push ecx
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.0040e3f0
mov eax, dword [esp + 0x1c]
add esp, 0xc
pop ebp
shl eax, 4
pop edi
sub eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040ac69
add esp, 0x2c
ret 8
lea ebp, [eax - 1]
test ebp, ebp
jle 0x403874
lea esp, [esp]
push ebx
push esi
call fcn.00403bc0
sub ebp, 1
add esi, 0x10
add ebx, 0x10
test ebp, ebp
jg 0x403860
lea ecx, [esp + 0x28]
push ecx
push esi
call fcn.00403bc0
movzx esi, byte [esp + 0x37]
cmp esi, 0x10
jge 0x4038ad
mov ecx, 0x10
sub ecx, esi
mov eax, ecx
cmp eax, 0x10
jge 0x403825
movzx edx, byte [esp + eax + 0x28]
cmp edx, esi
jne 0x4038ad
add eax, 1
cmp eax, 0x10
jl 0x403897
jmp 0x403825
pop ebp
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040ac69
add esp, 0x2c
ret 8
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040ac69
add esp, 0x2c
ret 8