Function at 0x414052
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x10]
push ebp
push esi
mov esi, dword [esp + 0x1c]
lea ebp, [eax - 0x32a]
push edi
lea edi, [eax - 0x93]
xor esi, 0x29e
lea ecx, [edx - 0xd2]
xor edx, 0x3f73
lea eax, [edi - 0x5b0]
cmp esi, eax
je 0x4142f8
mov ecx, dword [esp + 0x28]
lea eax, [edx + 0x3a86]
xor ecx, 0x757e
cmp ecx, eax
je 0x4142a0
lea eax, [ebp + 0x102]
cmp esi, eax
mov esi, dword [esp + 0x14]
jg 0x4140ed
cmp dword [esi + 0x98], 0x1083c
jb 0x4140cb
xor dword [esi + 0x80], 0x83951
jmp 0x4140da
mov eax, dword [esi + 0x78]
xor eax, dword [0x52a3f8]
xor dword [esi + 0xc4], eax
mov eax, dword [0x5178d4]
mov eax, dword [eax + 0x48]
sub eax, 0x40ad61b4
xor dword [0x52a458], eax
lea eax, [edi - 0x5f4]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffff698
push eax
lea eax, [edx + 0x35f3]
xor edx, 0x40c9
push eax
push edx
push esi
call fcn.00413cd9
add esp, 0x14
xor edi, edi
push ebx
mov edx, dword [0x5178d4]
mov eax, dword [edx + 0xc]
sub eax, dword [edx + 0xdc]
xor eax, 0xfb6cf
sub dword [0x52a4e4], eax
mov eax, dword [esi + 0xb4]
mov ecx, dword [edi + eax]
add edi, 4
mov eax, dword [esi + 0xe8]
xor eax, dword [esi + 0x7c]
sub eax, 0x13e42d
add dword [edx + 0x120], eax
mov eax, dword [0x5178d4]
mov ebx, dword [eax + 0x80]
mov eax, dword [0x52a4e8]
dec eax
imul ebx, ecx
add eax, dword [esi + 0x90]
mov dword [0x52a4e8], eax
mov ecx, dword [esi + 0xb8]
mov eax, dword [0x52a45c]
mov edx, ebx
shr edx, 0x10
mov byte [eax + ecx], dl
mov ecx, ebx
mov edx, dword [0x52a45c]
inc edx
shr ecx, 8
mov dword [0x52a45c], edx
mov eax, dword [esi + 0xb8]
mov byte [edx + eax], cl
mov edx, 0xb2d12
inc dword [0x52a45c]
mov ecx, dword [0x5178d4]
mov eax, dword [esi + 0xc4]
add dword [0x52a4c0], eax
mov eax, dword [ecx + 0x108]
add eax, dword [0x52a3f8]
xor eax, 0x8e8bf
or dword [ecx + 0x1c], eax
mov eax, dword [esi + 0xe8]
sub eax, edx
or dword [0x52a440], eax
mov eax, dword [esi + 0x20]
add eax, dword [0x52a4e4]
sub dword [esi + 0xac], eax
mov eax, dword [0x52a45c]
mov ecx, dword [esi + 0xb8]
mov byte [eax + ecx], bl
inc dword [0x52a45c]
mov eax, dword [0x5178d4]
mov eax, dword [eax + 0x44]
sub eax, 0x13ffca
xor dword [esi + 0x110], eax
mov eax, dword [0x5178d4]
mov ecx, dword [eax + 0x68]
mov eax, 0xffe85340
xor ecx, dword [esi + 0x7c]
sub eax, ecx
add dword [esi + 0xe8], eax
mov ecx, dword [0x5178d4]
mov eax, dword [esi + 0x90]
sub eax, dword [ecx + 0xe8]
add eax, edx
imul eax, dword [ecx + 0x7c]
mov dword [ecx + 0x7c], eax
cmp edi, 0xefd0
jl 0x414118
mov edx, dword [0x5178d4]
pop ebx
mov eax, dword [edx + 0x1c]
cmp eax, dword [esi + 0x10c]
ja 0x414285
mov eax, dword [edx + 0x114]
sub eax, dword [esi + 0x5c]
add eax, 0x1bf2a
imul eax, dword [esi + 0x108]
mov dword [esi + 0x108], eax
jmp 0x414322
mov eax, dword [0x52a3f4]
add eax, 0x5f02a38e
add eax, dword [edx + 0x90]
mov dword [edx + 0x80], eax
jmp 0x414322
mov eax, dword [0x52a4b8]
mov edx, dword [esp + 0x14]
add eax, 0xffffc659
mov ecx, dword [0x5178d4]
push eax
lea eax, [esi + 0x40b1]
push eax
mov eax, dword [ecx + 0x10]
xor eax, dword [edx + 0x118]
xor eax, edi
push edx
push eax
mov eax, dword [edx + 8]
sub eax, 0x3b66
or eax, 0x39a7
push eax
mov eax, dword [ecx + 0x48]
or eax, dword [edx + 0x48]
or eax, 0x3a9d
push eax
imul eax, dword [edx + 0xe0], 0x39a7
push eax
call fcn.0040495a
add esp, 0x1c
jmp 0x414322
xor edi, 0x3a86
cmp ecx, edi
jge 0x414322
lea eax, [ecx - 0x3d9f]
mov ecx, dword [0x52a3fc]
push eax
xor ecx, 0x3ea1
push ecx
call dword [sym.imp.KERNEL32.dll_ActivateActCtx]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
pop edi
xor ebp, 0x2ec
pop esi
mov eax, ebp
pop ebp
ret