Function at 0x41274f
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
add edx, 0x29
push esi
mov esi, dword [esp + 0x20]
mov eax, edx
push edi
mov edi, ecx
xor eax, 0x5ec
xor edi, 0x3f68
cmp edi, eax
je 0x41295b
push ebx
push ebp
mov dword [0x513ca4], 0x458000
xor ebp, ebp
mov ecx, dword [0x462934]
mov eax, 0xb2d12
sub eax, dword [ecx + 0xe8]
sub eax, dword [ecx + 0x20]
add dword [ecx + 0x78], eax
mov ecx, dword [0x462934]
mov eax, dword [ecx + 0x118]
sub eax, 0x160c63
imul eax, dword [ecx + 0x48]
mov dword [ecx + 0x48], eax
mov eax, dword [esi + 0xb4]
mov edx, dword [eax + ebp]
add ebp, 4
mov eax, dword [esi + 0xfc]
sub dword [esi + 0xe0], eax
mov eax, 0x10fd33
sub eax, dword [esi + 0x5c]
mov ecx, dword [0x462934]
add dword [ecx + 0xdc], eax
mov ecx, dword [0x513d04]
mov eax, dword [0x513bfc]
add ecx, 0xfff048dd
add eax, ecx
xor dword [esi + 8], eax
mov eax, dword [esi + 0x7c]
xor eax, dword [esi + 0xe8]
mov ecx, dword [0x462934]
sub eax, 0x13e42d
or dword [ecx + 0x10c], eax
mov ebx, dword [esi + 0x80]
mov eax, dword [0x462934]
imul ebx, edx
mov ecx, dword [eax + 0xb8]
mov eax, dword [0x513c74]
mov edx, ebx
shr edx, 8
mov byte [eax + ecx], dl
inc dword [0x513c74]
mov eax, dword [0x462934]
mov ecx, dword [eax + 0xb8]
mov eax, dword [esi + 0x84]
mov byte [ecx + eax], bl
xor eax, eax
inc dword [esi + 0x84]
inc eax
sub eax, dword [0x513cc8]
add dword [esi + 0x34], eax
mov eax, dword [0x462934]
mov eax, dword [eax + 0x44]
sub eax, 0x13ffca
add dword [esi + 0x110], eax
mov eax, dword [esi + 0x114]
sub eax, dword [esi + 0xe0]
mov ecx, dword [0x462934]
sub eax, 0x1d
add dword [ecx + 0xfc], eax
mov eax, dword [esi + 0x10c]
sub dword [0x513ce4], eax
mov ecx, dword [0x462934]
mov eax, dword [esi + 0xac]
sub eax, 0x47
imul eax, dword [ecx + 0xdc]
mov dword [ecx + 0xdc], eax
mov eax, dword [esi + 0x7c]
add eax, dword [0x513d04]
xor eax, 0x18c95c
add dword [0x513ccc], eax
cmp ebp, 0xa788
jl 0x412785
mov ecx, dword [0x513c68]
sub ecx, dword [0x513d08]
mov eax, dword [0x462934]
add ecx, 0x161598
pop ebp
pop ebx
mov dword [eax + 0x80], ecx
cmp dword [0x513c34], 0xb556
je 0x412914
mov eax, dword [esi + 0x68]
add eax, 0xf82a4
add eax, dword [esi + 0xc4]
add dword [esi + 0x80], eax
jmp 0x412921
mov eax, dword [0x513bf8]
xor eax, 0x7ad0
add dword [esi + 0x78], eax
add edi, 0x36fc
cmp dword [esi + 0x98], 0xb5e2
jne 0x412947
imul eax, dword [0x513d10], 0xadc3
mov dword [0x513d10], eax
jmp 0x4129e1
mov eax, dword [0x462934]
xor dword [eax + 0x80], 0x83951
jmp 0x4129e1
lea eax, [ecx + 0x3dbf]
mov ecx, dword [0x462934]
or eax, dword [ecx + 0x98]
cmp dword [esi + 0x38], eax
jae 0x4129e1
mov eax, dword [ecx + 0xec]
add eax, edx
cmp edx, eax
ja 0x4129e1
mov eax, dword [esi + 0x3c]
xor eax, 0x3cc2
add eax, dword [0x513c80]
push eax
mov eax, dword [0x513c38]
xor eax, 0x3a2e
and eax, dword [ecx + 0x118]
push eax
mov eax, dword [ecx + 0x94]
and eax, dword [0x513cc8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov eax, dword [0x462934]
mov ecx, dword [esi + 0x90]
sub ecx, dword [eax + 0x48]
add ecx, dword [0x513cd8]
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ecx, dword [esi + 0x3c]
xor ecx, 0x3b8a
add ecx, 0x3be8
xor dword [esi + 0xdc], ecx
xor edi, 0x8f8
mov eax, edi
pop edi
pop esi
ret