Function at 0x4052c4
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov eax, dword [esp + 0x10]
push ebx
push ebp
push esi
lea ecx, [eax + 0x1ec]
mov dword [esp + 0x1c], ecx
lea ecx, [eax - 0x1f05]
mov eax, dword [esp + 0x18]
mov ebp, ecx
add eax, 0xffffdf93
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x20]
mov ebx, ecx
push edi
mov edi, dword [esp + 0x34]
xor ebx, 0x437
add edi, 0xffffddd5
mov dword [esp + 0x34], eax
xor eax, 0x1eac
mov dword [esp + 0x10], edi
cmp edi, eax
jg 0x405670
mov esi, dword [esp + 0x30]
xor ebx, ebx
mov eax, dword [esi + 0xb4]
mov edx, dword [ebx + eax]
add ebx, 4
mov eax, dword [esi + 0x20]
add dword [esi + 0x48], eax
mov eax, dword [0xa662e4]
mov ecx, dword [eax + 0xac]
mov eax, dword [esi + 0xe0]
add ecx, 0xffffffb8
add eax, ecx
add dword [esi + 0x1c], eax
mov eax, dword [0xa662e4]
mov ecx, dword [eax + 0x124]
xor ecx, dword [eax + 0x114]
mov eax, dword [esi + 0x20]
sub ecx, 0x1388c2
sub eax, dword [esi + 0x70]
xor dword [esi + 0x5c], ecx
inc eax
mov ecx, dword [0xa662e4]
add dword [ecx + 0x98], eax
mov eax, dword [esi + 0x124]
xor eax, dword [esi + 0x34]
sub eax, 0x1388dd
imul eax, dword [esi + 0xa0]
mov dword [esi + 0xa0], eax
mov eax, dword [esi + 0x10c]
sub eax, dword [0xaa12ec]
mov ecx, dword [0xa662e4]
add eax, 0x18c93f
xor dword [ecx + 0x48], eax
mov eax, dword [0xa662e4]
movzx ecx, dl
movzx edx, byte [eax + 0x80]
mov eax, dword [0xaa12f4]
imul edx, ecx
mov ecx, dword [esi + 0xb8]
mov byte [eax + ecx], dl
inc dword [0xaa12f4]
mov eax, dword [0xa662e4]
mov eax, dword [eax + 0x70]
add eax, dword [esi + 0xdc]
xor eax, 0x38
add dword [esi + 0x78], eax
mov eax, dword [0xa662e4]
mov eax, dword [eax + 0x90]
xor eax, dword [esi + 0x48]
add dword [esi + 0xc4], eax
mov eax, dword [esi + 0xf4]
xor eax, 0xffe6b3e8
add dword [esi + 0x108], eax
mov eax, dword [0xa662e4]
mov eax, dword [eax + 8]
xor eax, 0x14
add dword [esi + 0x44], eax
mov eax, dword [esi + 8]
xor eax, dword [0xaa12a4]
sub eax, 0x15
xor dword [esi + 0x78], eax
mov eax, dword [esi + 0x68]
sub eax, dword [esi + 0x118]
add eax, 0x2571e5
xor dword [esi + 0x34], eax
mov eax, dword [0xa662e4]
mov eax, dword [eax + 0x20]
inc eax
imul eax, dword [0xaa131c]
mov dword [0xaa131c], eax
cmp ebx, 0x3f97b0
jl 0x40531e
mov eax, dword [esi + 0x114]
cmp eax, dword [esi + 0x120]
ja 0x405476
mov eax, dword [0xaa1278]
add eax, 0x269b
xor dword [esi + 0x48], eax
jmp 0x405487
mov eax, dword [esi + 0xdc]
xor eax, 0x11b8
mov dword [esi + 0x80], eax
mov eax, dword [0xa662e4]
xor ebp, 0x206d
mov eax, dword [eax + 0x7c]
add eax, 0x889ff91
mov dword [esi + 0xb4], 0x84d000
add dword [esi + 0x80], eax
xor edi, edi
mov eax, dword [esi + 0xb4]
push 0x37
mov ecx, dword [edi + eax]
add edi, 4
mov eax, dword [esi + 0x70]
imul eax, dword [esi + 0x90]
mov dword [esi + 0x70], eax
mov eax, dword [0xa662e4]
mov ebx, dword [eax + 0x80]
mov eax, dword [0xaa1378]
sub eax, dword [esi + 0xe8]
xor eax, 0xfffdbbad
imul ebx, ecx
add dword [esi + 0x7c], eax
mov eax, dword [esi + 0x70]
dec eax
add dword [esi + 0x44], eax
mov eax, dword [0xa662e4]
mov edx, ebx
mov ecx, dword [esi + 0xb8]
shr edx, 8
mov eax, dword [eax + 0x124]
sub eax, 0x1388de
imul eax, dword [esi + 0x120]
mov dword [esi + 0x120], eax
mov eax, dword [0xaa12f4]
mov byte [eax + ecx], dl
inc dword [0xaa12f4]
mov ecx, dword [esi + 0x10c]
xor ecx, dword [esi + 0xdc]
pop eax
sub eax, ecx
add dword [esi + 0x90], eax
mov eax, dword [0xa662e4]
push 0x1d
mov ecx, dword [eax + 0x34]
mov eax, dword [0xaa12b8]
dec eax
add eax, ecx
imul eax, dword [esi + 0xdc]
mov dword [esi + 0xdc], eax
mov eax, dword [0xa662e4]
mov ecx, dword [eax + 0x84]
mov eax, dword [esi + 0xb8]
mov byte [ecx + eax], bl
mov eax, dword [0xa662e4]
inc dword [eax + 0x84]
mov ecx, dword [0xa662e4]
mov eax, dword [esi + 0x114]
xor eax, 0x1d
sub dword [ecx + 0x118], eax
pop eax
sub eax, dword [esi + 0x114]
sub eax, dword [esi + 0x20]
add dword [esi + 0xc4], eax
mov eax, dword [0xaa12e0]
sub eax, dword [0xaa1358]
add eax, 0xb2d11
add dword [esi + 0xe0], eax
mov ecx, dword [0xa662e4]
mov eax, dword [ecx + 0x20]
sub eax, dword [esi + 0x90]
inc eax
add dword [ecx + 0x44], eax
cmp edi, 0x213dc8
jl 0x4054ac
mov ecx, dword [0xa662e4]
mov edi, dword [esp + 0x10]
cmp dword [ecx + 0xdc], 0x129ad
jae 0x4055f9
mov eax, dword [esi + 0x110]
xor eax, 0x38e38e09
mov dword [ecx + 0x80], eax
mov eax, edi
xor eax, 0x11d6
push eax
mov eax, dword [esp + 0x18]
add eax, 0x1110
push eax
lea eax, [edi + 0x105c]
push eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffa01
push eax
mov eax, dword [esp + 0x44]
add eax, 0x144e
push eax
push esi
call fcn.004122b7
mov ecx, dword [0xa662e4]
add esp, 0x18
mov eax, dword [0xaa12b4]
cmp eax, dword [ecx + 0xfc]
je 0x405650
mov eax, dword [esi + 0x48]
add eax, 0x38eb913e
xor dword [0xaa12f0], eax
mov eax, dword [0xaa1364]
cmp eax, dword [ecx + 0x90]
jbe 0x405739
mov dword [esi + 0xb4], 0xa662e8
jmp 0x405739
mov eax, dword [0xa662e4]
mov edi, dword [esp + 0x30]
mov esi, dword [eax + 8]
mov edx, dword [eax + 0x28]
and esi, ecx
mov ecx, dword [eax + 0xc]
sub edx, ebx
imul eax, dword [eax + 0xdc], 0x1af2
xor ecx, ebp
xor esi, dword [edi + 0x118]
add edx, 0x222b
xor eax, dword [edi + 0xc]
push eax
mov eax, dword [esp + 0x24]
push edi
push ecx
and eax, 0x11d6
push eax
push edx
push esi
call fcn.00404728
mov esi, eax
add esp, 0x18
mov eax, dword [edi + 0xe0]
or eax, ebp
push eax
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov eax, dword [0xaa134c]
xor eax, dword [esp + 0x34]
add eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
lea eax, [ebx + edx]
or ebx, edx
or eax, dword [0xaa12f8]
sub ebx, ebp
or dword [edi + 0x114], eax
mov eax, dword [0xa662e4]
mov eax, dword [eax + 0xe4]
imul eax, ecx
push eax
mov eax, ebp
xor eax, esi
add eax, dword [0xaa1378]
push eax
imul eax, ecx, 0x1110
push ebx
sub eax, dword [edi + 0x24]
push eax
mov eax, dword [edi + 0x128]
or eax, ecx
mov ecx, dword [esp + 0x34]
add ecx, edx
push eax
push ecx
mov ecx, dword [edi + 0x74]
or ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
pop edi
xor ebp, 0x256
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
pop ecx
ret