Function at 0x4052c2
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov ecx, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x18]
push ebp
lea eax, [ecx - 0xbc3]
mov dword [esp + 0x18], eax
lea ebp, [ecx - 0x867]
lea eax, [ecx - 0xc77]
mov dword [esp + 0xc], eax
lea edx, [ebx - 0x20f1]
mov eax, dword [esp + 0x14]
xor ebx, 0x3741
push esi
add eax, 0xfffffe32
mov dword [esp + 0x20], edx
push edi
mov edi, dword [esp + 0x34]
add edi, 0xfffffdbb
mov dword [esp + 0x34], eax
xor eax, 0x317d
mov dword [esp + 0x10], edi
cmp edi, eax
je 0x40566e
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 [0x566634]
mov ecx, dword [eax + 0xac]
mov eax, dword [esi + 0xe0]
add ecx, 0xffffffb8
add eax, ecx
add dword [esi + 0x1c], eax
mov eax, dword [0x566634]
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 [0x566634]
add dword [ecx + 0x98], eax
mov eax, dword [esi + 0x34]
xor eax, dword [esi + 0x124]
sub eax, 0x1388dd
imul eax, dword [esi + 0xa0]
mov dword [esi + 0xa0], eax
mov eax, dword [esi + 0x10c]
sub eax, dword [0x5726d4]
mov ecx, dword [0x566634]
add eax, 0x18c93f
xor dword [ecx + 0x48], eax
mov eax, dword [0x566634]
movzx ecx, dl
movzx edx, byte [eax + 0x80]
mov eax, dword [0x5726dc]
imul edx, ecx
mov ecx, dword [esi + 0xb8]
mov byte [eax + ecx], dl
inc dword [0x5726dc]
mov eax, dword [0x566634]
mov eax, dword [eax + 0x70]
add eax, dword [esi + 0xdc]
xor eax, 0x38
add dword [esi + 0x78], eax
mov eax, dword [0x566634]
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 [0x566634]
mov eax, dword [eax + 8]
xor eax, 0x14
add dword [esi + 0x44], eax
mov eax, dword [esi + 8]
xor eax, dword [0x57268c]
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 [0x566634]
mov eax, dword [eax + 0x20]
inc eax
imul eax, dword [0x572704]
mov dword [0x572704], eax
cmp ebx, 0xcf300
jl 0x405328
mov eax, dword [esi + 0x114]
cmp eax, dword [esi + 0x120]
ja 0x405480
mov eax, dword [0x572660]
add eax, 0x269b
xor dword [esi + 0x48], eax
jmp 0x405491
mov eax, dword [esi + 0xdc]
xor eax, 0x11b8
mov dword [esi + 0x80], eax
mov eax, dword [0x566634]
xor ebp, 0xcf5
mov eax, dword [eax + 0x7c]
add eax, 0x889ff91
mov dword [esi + 0xb4], 0x4f9000
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 + 0x90]
imul eax, dword [esi + 0x70]
mov dword [esi + 0x70], eax
mov eax, dword [0x566634]
mov ebx, dword [eax + 0x80]
mov eax, dword [0x572760]
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 [0x566634]
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 [0x5726dc]
mov byte [eax + ecx], dl
inc dword [0x5726dc]
mov ecx, dword [esi + 0x10c]
xor ecx, dword [esi + 0xdc]
pop eax
sub eax, ecx
add dword [esi + 0x90], eax
mov eax, dword [0x566634]
push 0x1d
mov ecx, dword [eax + 0x34]
mov eax, dword [0x5726a0]
dec eax
add eax, ecx
imul eax, dword [esi + 0xdc]
mov dword [esi + 0xdc], eax
mov eax, dword [0x566634]
mov ecx, dword [eax + 0x84]
mov eax, dword [esi + 0xb8]
mov byte [ecx + eax], bl
mov eax, dword [0x566634]
inc dword [eax + 0x84]
mov ecx, dword [0x566634]
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 [0x5726c8]
sub eax, dword [0x572740]
add eax, 0xb2d11
add dword [esi + 0xe0], eax
mov ecx, dword [0x566634]
mov eax, dword [ecx + 0x20]
sub eax, dword [esi + 0x90]
inc eax
add dword [ecx + 0x44], eax
cmp edi, 0x6c4e0
jl 0x4054b6
mov ecx, dword [0x566634]
mov edi, dword [esp + 0x10]
cmp dword [ecx + 0xdc], 0x129ad
jae 0x405603
mov eax, dword [esi + 0x110]
xor eax, 0x38e38e09
mov dword [ecx + 0x80], eax
mov eax, edi
xor eax, 0xae2
push eax
mov eax, dword [esp + 0x18]
add eax, 0x3f2
push eax
lea eax, [edi - 0xda7]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x44]
push esi
call fcn.00412294
mov ecx, dword [0x566634]
add esp, 0x18
mov eax, dword [0x57269c]
cmp eax, dword [ecx + 0xfc]
je 0x40564e
mov eax, dword [esi + 0x48]
add eax, 0x38eb913e
xor dword [0x5726d8], eax
mov eax, dword [0x57274c]
cmp eax, dword [ecx + 0x90]
jbe 0x405739
mov dword [esi + 0xb4], 0x566638
jmp 0x405739
mov eax, dword [0x566634]
mov edi, dword [esp + 0x30]
mov esi, dword [eax + 8]
mov ecx, dword [eax + 0xc]
and esi, edx
mov edx, dword [eax + 0x28]
xor ecx, ebp
imul eax, dword [eax + 0xdc], 0x1cd3
sub edx, ebx
xor esi, dword [edi + 0x118]
add edx, 0x17b0
xor eax, dword [edi + 0xc]
push eax
mov eax, dword [esp + 0x24]
push edi
push ecx
and eax, 0x1f05
push eax
push edx
push esi
call fcn.00404721
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 [0x572734]
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 [0x5726e0]
or dword [edi + 0x114], eax
mov eax, dword [0x566634]
sub ebx, dword [esp + 0x14]
mov eax, dword [eax + 0xe4]
imul eax, ecx
push eax
mov eax, ebp
xor eax, esi
add eax, dword [0x572760]
push eax
imul eax, ecx, 0x1105
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, 0x99c
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
pop ecx
ret