Function at 0x10042290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006365d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x1007d00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0x14]
test edx, edx
jne 0x1004232d
call fcn.10011060
mov dword [edi], 6
mov dword [edi + 4], eax
mov edi, dword [ebp + 0x18]
test edi, edi
je 0x1004230a
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x1004230a
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x1004230a
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edi, dword [ebp - 0x24]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005c9d3
mov esp, ebp
pop ebp
ret 0x14
cmp dword [ebp + 0xc], 8
jge 0x10042340
call fcn.10011060
mov dword [edi], 7
jmp 0x100422df
mov ecx, dword [esi + 0x10]
cmp ecx, 0x7d
jbe 0x10042355
call fcn.10011060
mov dword [edi], 8
jmp 0x100422df
mov bl, byte [eax + 5]
mov edi, 0x80
mov al, byte [ebp + 0xc]
xor ah, ah
and al, 0xf
or al, 0x80
test bl, bl
mov byte [ebp - 0x14], al
movzx eax, ah
cmove eax, edi
lea edi, [edx + 0x38]
push 0
or al, cl
push ecx
mov ecx, edi
mov byte [ebp - 0x13], al
call fcn.1001d440
mov eax, dword [esi + 0x10]
lea ecx, [ebp - 0x20]
push 0
test bl, bl
jne 0x10042447
push 0
push eax
call fcn.100082d0
lea eax, [ebp - 0x20]
push eax
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x3c]
call fcn.100083e0
add esp, 4
mov edx, eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0x14]
add ecx, 8
cmp ecx, edx
je 0x100423ce
cmp dword [edx + 0x14], 0x10
jb 0x100423c5
mov eax, dword [edx]
push dword [edx + 0x10]
push eax
call fcn.10021390
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x10042404
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100423fa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100423fa
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.1005ce33
add esp, 8
cmp dword [edi + 0x14], 0x10
mov dword [ebp - 0x14], 0
jb 0x10042413
mov edi, dword [edi]
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x10042422
add eax, dword [esi]
mov esi, dword [esi]
jmp 0x10042424
add eax, esi
xor edx, edx
cmp esi, eax
je 0x100424dc
sub edi, esi
mov cl, byte [ebp + edx - 0x14]
inc edx
xor cl, byte [esi]
and edx, 3
mov byte [edi + esi], cl
inc esi
cmp esi, eax
jne 0x10042430
jmp 0x100424dc
push eax
call fcn.100082a0
lea eax, [ebp - 0x20]
push eax
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x3c]
call fcn.100083e0
add esp, 4
mov edx, eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp + 0x14]
add ecx, 8
cmp ecx, edx
je 0x10042480
cmp dword [edx + 0x14], 0x10
jb 0x10042477
mov eax, dword [edx]
push dword [edx + 0x10]
push eax
call fcn.10021390
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x100424b6
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100424ac
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100424ac
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.1005ce33
add esp, 8
cmp dword [edi + 0x14], 0x10
jb 0x100424be
mov edi, dword [edi]
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x100424cd
add eax, dword [esi]
mov esi, dword [esi]
jmp 0x100424cf
add eax, esi
sub eax, esi
push eax
push esi
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 0x24]
mov dword [eax + 0x50], ecx
mov eax, dword [ebp + 0x14]
mov byte [eax + 0x54], 1
mov ebx, dword [ebp + 0x18]
mov dword [edi], 0
mov dword [edi + 4], 0x1007d018
test ebx, ebx
je 0x1004230d
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x1004230d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [ebx + 8], esi
dec esi
jne 0x1004230d
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 4]
jmp 0x1004230d