Function at 0x402455
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
call fcn.00401087
test word [0x426b68], 0x2000
je 0x402492
cmp dword [0x427d94], esi
jne 0x40248d
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040111a
add esp, 8
push str.Memory_tracking_must_be_enabled_n
call fcn.0040180d
call fcn.004023e1
mov edi, dword [ebp + 8]
cmp edi, esi
jg 0x4024b2
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040111a
add esp, 8
push edi
push str.Invalid_Memory_Size___d__n
call fcn.0040180d
mov ecx, dword [0x427da0]
mov edx, dword [0x427da4]
push ebx
lea ebx, [edi + 0xb]
and ebx, 0xfffffffc
lea eax, [ecx + ebx]
cmp eax, edx
jle 0x4024e7
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040111a
add esp, 8
push edx
push ebx
push ecx
push str.Memory_exceeds_limit____d___d_____d__n
call fcn.0040180d
cmp dword [0x427d94], 1
jne 0x40259c
test byte [ebp + 0xc], 2
lea eax, [ebx + 0x1c]
push eax
je 0x402529
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
test edx, edx
mov dword [ebp - 4], edx
jne 0x40254f
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040111a
add esp, 8
push ebx
push edi
push str.No_Local_Memory_available___d____d__n
call fcn.0040180d
call fcn.0040fbea
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x40254d
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040111a
add esp, 8
push ebx
push edi
push str.No_Memory_available___d____d__n
jmp 0x402524
mov edx, eax
lea esi, [edx + ebx]
xor eax, eax
push 7
pop ecx
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x14]
mov dword [esi], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [0x427d98]
test eax, eax
mov dword [esi + 0x10], edx
je 0x40258c
mov ecx, dword [eax + 0x18]
mov dword [esi + 0x18], ecx
mov dword [esi + 0x14], eax
mov dword [eax + 0x18], esi
jmp 0x402594
and dword [esi + 0x18], 0
and dword [esi + 0x14], 0
mov dword [0x427d98], esi
jmp 0x4025ca
test byte [ebp + 0xc], 2
push ebx
je 0x4025b7
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x4025c8
jmp 0x40250f
call fcn.0040fbea
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x402536
mov edx, eax
cmp dword [0x42500c], edx
jle 0x4025d8
mov dword [0x42500c], edx
lea eax, [edx + ebx]
cmp dword [0x427db8], eax
jge 0x4025e8
mov dword [0x427db8], eax
xor edi, edi
mov ecx, edi
mov eax, edx
sar eax, cl
xor al, 0xcc
mov byte [edi + edx], al
inc edi
cmp edi, 4
jl 0x4025ea
lea eax, [ebx - 8]
push eax
lea edi, [edx + 4]
push 0
push edi
call fcn.0040f880
add esp, 0xc
xor ecx, ecx
mov edx, dword [ebp - 4]
sar edx, cl
lea eax, [edi + ebx - 8]
xor dl, 0xcc
mov byte [ecx + eax], dl
inc ecx
cmp ecx, 4
jl 0x40260f
mov eax, dword [0x427d9c]
mov ecx, dword [0x427da0]
inc eax
add ecx, ebx
cmp dword [0x427dbc], eax
mov dword [0x427d9c], eax
mov dword [0x427da0], ecx
pop ebx
jge 0x40264b
mov dword [0x427dbc], eax
cmp dword [0x427dc0], ecx
jge 0x402659
mov dword [0x427dc0], ecx
call fcn.004010a9
test word [0x426b68], 0x200
je 0x402681
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
push esi
push edi
push str.___Alloc_0x_p_0x_p:__10d___s____d__n
call fcn.004017c6
add esp, 0x18
mov eax, edi
pop edi
pop esi
leave
ret