Function at 0x406b43
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
mov eax, ecx
mov edx, dword [esp + 0x18]
xor eax, 0x7d2e
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
lea ebx, [ecx + 0x102]
push esi
mov esi, dword [esp + 0x18]
xor edx, 0x3ea1
push edi
mov edi, ecx
mov dword [esp + 0x18], eax
xor edi, 0x3d9f
mov dword [esp + 0x28], edx
add esi, 0xffffbfca
mov dword [esp + 0x24], esi
lea eax, [edi + 0x35b7]
cmp edx, eax
je 0x406dd9
cmp edi, ebp
jge 0x406dd9
lea eax, [ebx + 0x195]
cmp edi, eax
je 0x406d53
mov esi, dword [esp + 0x14]
add ebp, 0x437
mov eax, dword [0x52a450]
xor edi, 0x3f73
mov ecx, dword [0x52a440]
mov edx, dword [0x5178d4]
add ecx, 0xf82a4
sub eax, dword [esi + 0x118]
add eax, 0x161598
mov dword [0x52a458], eax
mov eax, dword [0x52a49c]
add eax, ecx
add dword [edx + 0x80], eax
lea eax, [ebx + 0x228]
push eax
lea eax, [ebx - 0xb4]
push eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffec2
push eax
push edi
lea eax, [ebp + 0x531]
push eax
push dword [0x5178d4]
mov eax, dword [esp + 0x3c]
add eax, 0x40c9
push eax
call fcn.00414052
add esp, 0x1c
cmp dword [esi + 0x120], 0x8d5a
jae 0x406c3c
mov dword [esi + 0xb4], 0x415190
jmp 0x406c50
mov eax, dword [esi + 0xfc]
lea ecx, [eax - 0x24b5d]
or ecx, eax
mov dword [esi + 0xfc], ecx
xor edi, edi
mov eax, dword [esi + 0x34]
xor eax, 1
add dword [esi + 0x10c], eax
mov eax, dword [esi + 0xb4]
push 0x1d
mov ecx, dword [edi + eax]
add edi, 4
mov eax, dword [0x52a4b8]
sub dword [esi + 0xa0], eax
mov ebx, dword [0x52a458]
mov eax, dword [0x5178d4]
imul ebx, ecx
mov ecx, dword [eax + 0x84]
mov eax, dword [esi + 0xb8]
mov edx, ebx
shr edx, 8
mov byte [ecx + eax], dl
mov eax, dword [0x5178d4]
inc dword [eax + 0x84]
mov edx, dword [esi + 0x114]
pop eax
sub eax, edx
add dword [esi + 0x78], eax
mov eax, dword [0x52a454]
add eax, 0xffe736c1
add dword [esi + 0x78], eax
mov eax, dword [0x5178d4]
mov eax, dword [eax + 0x1c]
sub eax, 0x11
imul eax, edx
mov dword [esi + 0x114], eax
mov eax, dword [esi + 8]
add eax, dword [esi + 0x68]
xor eax, 0xfff09a93
or dword [esi + 0x48], eax
mov eax, dword [0x5178d4]
mov eax, dword [eax + 8]
sub eax, dword [esi + 0xc]
xor eax, 0xfff0490e
add dword [esi + 0x108], eax
mov eax, dword [0x52a40c]
xor eax, dword [0x52a4e0]
xor eax, 1
mov dword [0x52a4e0], eax
mov ecx, dword [esi + 0x84]
mov eax, dword [0x52a490]
mov byte [eax + ecx], bl
inc dword [esi + 0x84]
mov ecx, dword [0x5178d4]
mov eax, dword [esi + 0xa0]
sub dword [ecx + 0x1c], eax
cmp edi, 0x1d58
jl 0x406c52
mov eax, dword [esi + 0x124]
add eax, dword [0x52a3f8]
xor eax, 0x22d90b3a
mov dword [esi + 0x80], eax
jmp 0x406dd9
mov edx, dword [esp + 0x14]
mov eax, esi
and eax, 0x3a42
cmp dword [edx + 0xfc], eax
jne 0x406dae
mov eax, dword [edx + 0xec]
xor eax, ebx
add eax, 0x3ded
cmp dword [0x52a4b0], eax
ja 0x406dd9
mov eax, dword [edx + 0xdc]
imul eax, ebx
cmp dword [edx + 0x98], eax
jbe 0x406dd9
mov ecx, dword [0x5178d4]
mov eax, dword [edx + 0x120]
and eax, dword [0x52a454]
xor eax, dword [ecx + 0x20]
xor eax, ebx
mov dword [ecx + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406dd9
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
add eax, 0xffffc15f
cmp ebx, eax
je 0x406dd9
mov eax, dword [0x52a4b4]
add eax, 0xffffc9f5
add eax, dword [edx + 0x78]
cmp ebx, eax
jae 0x406dd9
or esi, ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
lea eax, [ebp - 0x44f]
pop ebp
pop ebx
ret