Function at 0x40395c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x4122a4]
push ebx
push esi
push edi
movzx ecx, byte [eax]
movzx esi, byte [eax + 2]
lea edx, [ebp + ecx - 0x124]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax + 3]
lea edi, [ebp + ecx - 0x124]
mov ecx, dword [ebp + 0xc]
add ecx, 2
lea esi, [ebp + esi - 0x124]
lea eax, [ebp + eax - 0x124]
mov dword [ebp + 0xc], 0x10
mov bl, byte [ecx - 2]
push 4
mov byte [eax], bl
mov bl, byte [ecx - 1]
mov byte [esi], bl
mov bl, byte [ecx]
mov byte [edi], bl
mov bl, byte [ecx + 1]
mov byte [edx], bl
pop ebx
add eax, ebx
add esi, ebx
add edi, ebx
add ecx, ebx
add edx, ebx
dec dword [ebp + 0xc]
jne 0x4039a5
lea esi, [ebp - 0xec]
mov dword [ebp - 0x20], 0x30
mov edi, dword [esi - 0x34]
mov eax, dword [esi]
push 0x12
push edi
mov dword [ebp + 0xc], eax
call fcn.00407848
push 7
push edi
mov ebx, eax
call fcn.00407848
push 0x13
xor ebx, eax
push dword [ebp + 0xc]
shr edi, 3
xor ebx, edi
call fcn.00407848
push 0x11
mov edi, eax
push dword [ebp + 0xc]
call fcn.00407848
xor edi, eax
mov eax, dword [ebp + 0xc]
shr eax, 0xa
xor edi, eax
add esp, 0x20
add ebx, edi
add ebx, dword [esi - 0x38]
add esi, 4
add ebx, dword [esi - 0x18]
dec dword [ebp - 0x20]
mov dword [esi + 4], ebx
jne 0x4039d7
mov eax, dword [ebp + 8]
xor esi, esi
mov ecx, dword [eax]
mov ebx, dword [eax + 0x10]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x18], ecx
mov ecx, dword [eax + 8]
mov dword [ebp + 0xc], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x14], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebp - 8], ecx
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
jmp 0x403a67
mov ebx, dword [ebp - 0x10]
push 0x19
push ebx
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
push 6
push ebx
xor edi, eax
call fcn.00407848
mov ecx, dword [ebp - 8]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x1c]
push 0x16
push ebx
xor eax, ecx
add edi, eax
mov eax, dword [ebp - 0x18]
add edi, dword [esi + 0x40d110]
mov dword [ebp - 0x24], eax
xor dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], eax
add edi, dword [ebp + esi - 0x124]
and dword [ebp - 0x20], ebx
add edi, dword [ebp - 4]
add dword [ebp - 0x14], edi
call fcn.00407848
push 0xd
push ebx
mov dword [ebp - 4], eax
call fcn.00407848
mov ecx, dword [ebp - 4]
push 2
xor ecx, eax
push ebx
mov dword [ebp - 4], ecx
call fcn.00407848
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 0x14]
xor ecx, eax
mov eax, dword [ebp - 0x24]
and eax, dword [ebp + 0xc]
add edi, ecx
push 0x19
push ebx
xor eax, dword [ebp - 0x20]
add eax, edi
mov dword [ebp - 4], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
add esp, 0x40
xor edi, eax
push 6
push ebx
call fcn.00407848
mov ecx, dword [ebp - 0x10]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp - 8]
push 0x16
push dword [ebp - 4]
xor eax, ecx
add edi, eax
add edi, dword [esi + 0x40d114]
add edi, dword [ebp + esi - 0x120]
add edi, dword [ebp - 0xc]
add dword [ebp + 0xc], edi
call fcn.00407848
push 0xd
mov ebx, eax
push dword [ebp - 4]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp - 4]
call fcn.00407848
xor ebx, eax
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 4]
add edi, ebx
mov ebx, dword [ebp + 0xc]
push 0x19
xor eax, dword [ebp - 0x20]
push ebx
add eax, edi
mov dword [ebp - 0xc], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
push 6
push ebx
xor edi, eax
call fcn.00407848
mov ecx, dword [ebp - 0x14]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp - 0x10]
push 0x16
push dword [ebp - 0xc]
xor eax, ecx
add edi, eax
add edi, dword [esi + 0x40d118]
add edi, dword [ebp + esi - 0x11c]
add edi, dword [ebp - 8]
add dword [ebp - 0x18], edi
call fcn.00407848
add esp, 0x40
mov ebx, eax
push 0xd
push dword [ebp - 0xc]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp - 0xc]
call fcn.00407848
mov ecx, dword [ebp - 0xc]
xor ebx, eax
mov eax, dword [ebp - 0xc]
and ecx, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x1c]
add edi, ebx
mov ebx, dword [ebp - 0x18]
push 0x19
and eax, dword [ebp - 4]
push ebx
xor eax, ecx
add eax, edi
mov dword [ebp - 8], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
push 6
push ebx
xor edi, eax
call fcn.00407848
mov ecx, dword [ebp + 0xc]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp - 0x14]
xor eax, ecx
add edi, eax
add edi, dword [esi + 0x40d11c]
add edi, dword [ebp + esi - 0x118]
add edi, dword [ebp - 0x10]
add dword [ebp - 0x1c], edi
push 0x16
push dword [ebp - 8]
call fcn.00407848
push 0xd
mov ebx, eax
push dword [ebp - 8]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp - 8]
call fcn.00407848
mov ecx, dword [ebp - 0xc]
xor ebx, eax
mov eax, dword [ebp - 0xc]
and ecx, dword [ebp - 8]
xor eax, dword [ebp - 8]
add esp, 0x40
add edi, ebx
mov ebx, dword [ebp - 0x1c]
and eax, dword [ebp - 4]
push 0x19
push ebx
xor eax, ecx
add eax, edi
mov dword [ebp - 0x10], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
push 6
push ebx
xor edi, eax
call fcn.00407848
mov ecx, dword [ebp - 0x18]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp + 0xc]
push 0x16
push dword [ebp - 0x10]
xor eax, ecx
add edi, eax
add edi, dword [esi + 0x40d120]
add edi, dword [ebp + esi - 0x114]
add edi, dword [ebp - 0x14]
add dword [ebp - 4], edi
call fcn.00407848
push 0xd
mov ebx, eax
push dword [ebp - 0x10]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp - 0x10]
call fcn.00407848
mov ecx, dword [ebp - 8]
xor ebx, eax
mov eax, dword [ebp - 8]
and ecx, dword [ebp - 0x10]
xor eax, dword [ebp - 0x10]
add edi, ebx
mov ebx, dword [ebp - 4]
push 0x19
and eax, dword [ebp - 0xc]
push ebx
xor eax, ecx
add eax, edi
mov dword [ebp - 0x14], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
add esp, 0x40
xor edi, eax
push 6
push ebx
call fcn.00407848
xor edi, eax
mov eax, ebx
and ebx, dword [ebp - 0x1c]
push 0x16
not eax
and eax, dword [ebp - 0x18]
push dword [ebp - 0x14]
xor eax, ebx
add edi, eax
add edi, dword [esi + 0x40d124]
add edi, dword [ebp + esi - 0x110]
add edi, dword [ebp + 0xc]
add dword [ebp - 0xc], edi
call fcn.00407848
push 0xd
mov ebx, eax
push dword [ebp - 0x14]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp - 0x14]
call fcn.00407848
mov ecx, dword [ebp - 0x10]
xor ebx, eax
mov eax, dword [ebp - 0x10]
and ecx, dword [ebp - 0x14]
xor eax, dword [ebp - 0x14]
add edi, ebx
mov ebx, dword [ebp - 0xc]
push 0x19
and eax, dword [ebp - 8]
push ebx
xor eax, ecx
add eax, edi
mov dword [ebp + 0xc], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
push 6
push ebx
xor edi, eax
call fcn.00407848
mov ecx, dword [ebp - 4]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp - 0x1c]
push 0x16
push dword [ebp + 0xc]
xor eax, ecx
add edi, eax
add edi, dword [esi + 0x40d128]
add edi, dword [ebp + esi - 0x10c]
add edi, dword [ebp - 0x18]
add dword [ebp - 8], edi
call fcn.00407848
add esp, 0x40
mov ebx, eax
push 0xd
push dword [ebp + 0xc]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp + 0xc]
call fcn.00407848
mov ecx, dword [ebp - 0x14]
xor ebx, eax
mov eax, dword [ebp - 0x14]
and ecx, dword [ebp + 0xc]
xor eax, dword [ebp + 0xc]
add edi, ebx
mov ebx, dword [ebp - 8]
push 0x19
and eax, dword [ebp - 0x10]
push ebx
xor eax, ecx
add eax, edi
mov dword [ebp - 0x18], eax
call fcn.00407848
push 0xb
push ebx
mov edi, eax
call fcn.00407848
push 6
push ebx
xor edi, eax
call fcn.00407848
mov ecx, dword [ebp - 0xc]
xor edi, eax
mov eax, ebx
and ecx, ebx
not eax
and eax, dword [ebp - 4]
push 0x16
push dword [ebp - 0x18]
xor eax, ecx
add edi, eax
add edi, dword [esi + 0x40d12c]
add edi, dword [ebp + esi - 0x108]
add edi, dword [ebp - 0x1c]
add dword [ebp - 0x10], edi
call fcn.00407848
push 0xd
mov ebx, eax
push dword [ebp - 0x18]
call fcn.00407848
push 2
xor ebx, eax
push dword [ebp - 0x18]
call fcn.00407848
mov ecx, dword [ebp + 0xc]
xor ebx, eax
mov eax, dword [ebp + 0xc]
and ecx, dword [ebp - 0x18]
xor eax, dword [ebp - 0x18]
add edi, ebx
add esi, 0x20
add esp, 0x40
and eax, dword [ebp - 0x14]
xor eax, ecx
add eax, edi
cmp esi, 0x100
mov dword [ebp - 0x1c], eax
jl 0x403a64
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
pop edi
pop esi
add dword [eax], ecx
mov ecx, dword [ebp - 0x18]
add dword [eax + 4], ecx
mov ecx, dword [ebp + 0xc]
add dword [eax + 8], ecx
mov ecx, dword [ebp - 0x14]
add dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0x10]
add dword [eax + 0x10], ecx
mov ecx, dword [ebp - 8]
add dword [eax + 0x14], ecx
mov ecx, dword [ebp - 0xc]
add dword [eax + 0x18], ecx
mov ecx, dword [ebp - 4]
add dword [eax + 0x1c], ecx
pop ebx
leave
ret