Function at 0x874c10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [0x879cd8]
xor eax, eax
mov dword [ebp - 0x1c], eax
push ebx
push esi
mov dword [ebp - 0x18], eax
push edi
mov dword [ebp - 0x14], eax
push 0xffffffffffffffff
push ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [ebp + 8]
test edi, edi
jne 0x874c7b
mov esi, dword [ebp + 0x14]
test esi, esi
jbe 0x874e75
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub edx, eax
mov bl, byte [eax]
mov cl, al
add cl, dl
xor bl, cl
mov cl, bl
mov byte [eax], bl
and ecx, 0xff
inc eax
dec esi
mov cl, byte [ecx + 0x8795e0]
mov byte [eax - 1], cl
jne 0x874c57
jmp 0x874e75
push edi
call fcn.008744b0
add esp, 4
and eax, 0xff
mov dword [ebp - 0xc], eax
jne 0x874ca3
mov eax, dword [0x879cd8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x50e]
test eax, eax
je 0x874e49
mov al, byte [edi + 0x261]
test al, al
je 0x874e49
cmp al, 2
jne 0x874cf4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push ecx
push edx
add edi, 0x2c
push eax
push edi
call fcn.00874aa0
mov ecx, dword [0x879cd8]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 1
jne 0x874e33
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov edx, esi
mov edi, esi
add esi, eax
and edx, 0xf
mov eax, esi
sub edi, edx
and eax, 0xf
je 0x874d1d
mov ecx, 0x10
sub ecx, eax
add esi, ecx
mov ebx, esi
push 4
sub ebx, edi
push 0x3000
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
mov dl, byte [ecx + 0xd]
add edx, edi
mov dword [ebp - 0x18], edx
lea edx, [ebp - 0x20]
push edx
lea edx, [ebp - 8]
push edx
push ebx
push eax
mov eax, dword [ecx]
push eax
call fcn.008712b0
test eax, eax
jne 0x874d9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x874d9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x874d9d
mov ecx, dword [ebp - 4]
push 0x8000
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [0x879cd8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
lea eax, [ebp - 8]
push 1
push eax
mov eax, dword [edx]
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp ebx, dword [ebp - 8]
je 0x874dbb
sub esi, 0x10
cmp edi, esi
mov ebx, edi
jae 0x874ded
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
add ecx, 0x2c
sub eax, edi
mov dword [ebp - 0xc], ecx
mov dword [ebp + 8], eax
jmp 0x874dd7
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
add eax, ebx
push eax
push edx
call fcn.0086c650
add ebx, 0x10
add esp, 8
cmp ebx, esi
jb 0x874dd4
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov esi, eax
sub esi, edi
mov edi, dword [ebp + 0xc]
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x8000
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [0x879cd8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x879cd8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x14]
test esi, esi
jbe 0x874e75
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub edx, eax
mov bl, byte [eax]
mov cl, dl
add cl, al
xor bl, cl
mov cl, bl
mov byte [eax], bl
and ecx, 0xff
inc eax
dec esi
mov cl, byte [ecx + edi + 0x2c]
mov byte [eax - 1], cl
jne 0x874e58
mov edx, dword [0x879cd8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret