Function at 0x403470
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
mov ecx, dword [edi + 0x134]
mov ebx, ecx
mov eax, dword [edi + 0x140]
and ebx, 0xf
mov dword [ebp - 4], ebx
test eax, eax
js 0x403680
cmp eax, 0xb
jne 0x4034b3
mov dword [edi + 0x140], 0xfffffffa
lea eax, [esi - 6]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
lea eax, [ecx + edx]
cmp eax, dword [edi + 0x128]
jbe 0x4034d7
mov dword [edi + 0x140], 0xfffffff9
mov eax, 0xfffffff9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov eax, ecx
sub eax, ebx
sub eax, edi
test al, 7
jne 0x4035c2
test edx, edx
je 0x40350d
lea esp, [esp]
test bl, 7
je 0x403507
mov eax, dword [ebp + 8]
lea ecx, [ebx + edi]
inc ebx
mov al, byte [esi + eax]
inc esi
xor byte [ecx + 0x20], al
cmp esi, edx
jb 0x4034f0
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ebx
lea eax, [esi + 8]
mov dword [ebp - 8], eax
cmp eax, edx
ja 0x403557
add ecx, 0xfffffff8
mov dword [ebp - 4], ecx
lea ecx, [ecx]
cmp ebx, 8
ja 0x403551
mov edx, dword [ebp - 4]
lea ecx, [ebx + edi]
add esi, 8
add ebx, 8
mov eax, dword [edx + eax]
xor dword [ecx + 0x20], eax
mov eax, dword [ebp - 8]
mov eax, dword [edx + eax + 4]
xor dword [ecx + 0x24], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
add eax, 8
mov dword [ebp - 8], eax
cmp eax, edx
jbe 0x403520
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ebx
lea eax, [esi + 0x10]
cmp eax, edx
ja 0x40362e
lea eax, [edi + 0x30]
mov dword [ebp - 0xc], eax
lea ebx, [esi + ecx]
lea eax, [edi + 0x20]
mov dword [ebp - 8], eax
mov eax, 0x10
mov edi, dword [ebp - 8]
sub eax, ecx
mov dword [ebp - 0x10], eax
mov edi, edi
push dword [ebp - 0xc]
push edi
push edi
call fcn.00404e24
mov ecx, dword [edi]
add esp, 0xc
xor ecx, dword [ebx]
add esi, 0x10
mov eax, dword [edi + 4]
xor eax, dword [ebx + 4]
mov edx, dword [ebp + 0xc]
mov dword [edi], ecx
mov dword [edi + 4], eax
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
add ebx, 0x10
xor eax, dword [edi + 0xc]
xor ecx, dword [edi + 8]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x10]
add eax, ebx
cmp eax, edx
jbe 0x403580
jmp 0x403628
test edx, edx
je 0x4035e3
cmp ebx, 0x10
jae 0x4035dd
mov eax, dword [ebp + 8]
lea ecx, [ebx + edi]
inc ebx
mov al, byte [esi + eax]
inc esi
xor byte [ecx + 0x20], al
cmp esi, edx
jb 0x4035c6
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ebx
lea eax, [esi + 0x10]
mov dword [ebp - 0x10], eax
cmp eax, edx
ja 0x40362e
lea eax, [edi + 0x30]
add ecx, 0xfffffff0
lea ebx, [edi + 0x20]
mov dword [ebp - 8], eax
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
nop
push eax
push ebx
push ebx
call fcn.00404e24
mov eax, dword [ebp - 0xc]
add eax, edi
push eax
push ebx
push ebx
call fcn.00403f30
mov edx, dword [ebp + 0xc]
add edi, 0x10
mov eax, dword [ebp - 8]
add esp, 0x18
add esi, 0x10
cmp edi, edx
jbe 0x403600
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp - 4]
cmp esi, edx
jae 0x403662
lea ecx, [edi + 0x20]
cmp ebx, 0x10
jne 0x403650
lea eax, [edi + 0x30]
push eax
push ecx
push ecx
call fcn.00404e24
mov edx, dword [ebp + 0xc]
lea ecx, [edi + 0x20]
add esp, 0xc
xor ebx, ebx
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
inc esi
xor byte [ecx + ebx], al
inc ebx
lea ecx, [edi + 0x20]
cmp esi, edx
jb 0x403635
cmp ebx, 0x10
jne 0x403678
lea eax, [edi + 0x30]
lea ecx, [edi + 0x20]
push eax
push ecx
push ecx
call fcn.00404e24
add esp, 0xc
add dword [edi + 0x134], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret