Function at 0x414240
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, 1
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi]
cmp dword [esi], ecx
cmova ecx, dword [esi]
cmp ecx, eax
cmovb ecx, eax
mov dword [ebp + 0xc], ecx
call fcn.00412140
mov ecx, dword [ebp + 0xc]
mov ebx, eax
mov dword [ebp - 0xc], ebx
call fcn.00412140
mov edx, esi
mov dword [ebp + 0x10], eax
mov ecx, ebx
call fcn.00412220
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.00412220
mov esi, dword [ebp + 0xc]
lea ecx, [esi + 1]
call fcn.00412140
mov edi, eax
lea ecx, [esi + 1]
mov dword [ebp - 8], edi
call fcn.00412140
mov ecx, esi
mov dword [ebp - 4], eax
call fcn.00412140
shl esi, 6
mov dword [ebp - 0x10], eax
mov dword [ebp + 0xc], esi
lea ecx, [esi + esi]
shr ecx, 5
call fcn.00412140
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], 0
lea ecx, [eax + 4]
mov dword [ebp - 0x18], ecx
test esi, esi
jne 0x414443
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x20], 0
mov esi, dword [ebp - 0xc]
je 0x4144d3
xor edx, edx
mov ecx, esi
call fcn.00412640
mov ecx, dword [edi + 4]
xor edx, edx
mov ebx, dword [ebp + 0x10]
mov dword [ecx], eax
mov ecx, ebx
call fcn.00412640
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 4]
mov edx, edi
mov dword [ecx], eax
mov ecx, esi
call fcn.00412220
mov edx, dword [ebp - 4]
mov ecx, ebx
call fcn.00412220
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4143ef
nop dword [eax]
mov ecx, dword [ebp - 0x1c]
dec eax
mov dword [ebp + 0xc], eax
lea esi, [eax + eax]
mov edx, esi
call fcn.00412640
mov ecx, dword [ebp - 0x1c]
lea edx, [esi + 1]
mov edi, eax
call fcn.00412640
mov ebx, eax
mov eax, dword [ebp - 8]
mov edx, eax
mov ecx, dword [eax + 4]
mov esi, dword [ecx]
mov ecx, eax
and esi, 1
push esi
push dword [ebp + 0x10]
call fcn.00412f70
mov edx, dword [ebp - 4]
mov ecx, edx
push esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.00412f70
mov edx, dword [ebp - 8]
mov ecx, edx
push 1
call fcn.00413680
mov edx, dword [ebp - 4]
add esp, 0x14
mov ecx, edx
push edi
push dword [ebp - 8]
call fcn.00412f70
push 1
mov edx, esi
mov ecx, esi
call fcn.004135a0
add esp, 0xc
mov edx, esi
mov ecx, esi
push edi
mov edi, dword [ebp + 0x10]
push edi
call fcn.00412f70
push ebx
mov edx, edi
mov ecx, esi
call fcn.004122d0
mov edi, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp - 4]
mov ecx, edi
push ebx
call fcn.004122d0
xor dword [ebp - 0x14], ebx
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x414340
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, ebx
push edi
call fcn.00412cb0
add esp, 4
mov edx, edi
mov ecx, edi
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00412260
push dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov edx, esi
call fcn.00412cb0
mov edx, dword [ebp - 4]
add esp, 0xc
mov ecx, edx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00412260
mov ecx, dword [ebp - 0x20]
add esp, 8
mov edx, edi
call fcn.00412220
jmp 0x4144d6
mov eax, dword [ebp + 0x10]
mov edx, ebx
mov ecx, eax
call fcn.00412fd0
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
mov esi, edx
mov ecx, dword [ebp - 0x18]
and esi, 1
mov ebx, esi
xor ebx, eax
mov ecx, dword [ecx]
mov edi, dword [ecx]
and edi, edx
mov edx, dword [ebp + 0x10]
and edi, 1
and ebx, edi
xor ebx, esi
mov esi, dword [ebp - 0xc]
push ebx
mov ecx, esi
call fcn.004122d0
add esp, 4
mov edx, esi
mov ecx, esi
push edi
push dword [ebp + 0x10]
call fcn.00412fa0
push 1
mov edx, esi
mov ecx, esi
call fcn.00413680
mov esi, dword [ebp - 0x14]
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
add esi, esi
mov edx, esi
push edi
call fcn.00412670
mov ecx, dword [ebp - 0x1c]
lea edx, [esi + 1]
add esp, 4
push ebx
call fcn.00412670
mov eax, dword [ebp - 0x14]
add esp, 4
mov ebx, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp + 0xc]
jb 0x414440
mov edi, dword [ebp - 8]
jmp 0x4142e2
mov ebx, dword [ebp + 0x10]
mov ecx, esi
call fcn.00412200
mov ecx, ebx
call fcn.00412200
mov ecx, edi
call fcn.00412200
mov ecx, dword [ebp - 4]
call fcn.00412200
mov ecx, dword [ebp - 0x10]
call fcn.00412200
mov ecx, dword [ebp - 0x1c]
call fcn.00412200
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret