Function at 0x4f9b10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
push 0xd440
push 0x40
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ebx, 1
lea edx, [eax - 0x3fa]
mov dword [ebp + 0xc], edx
jmp 0x4f9b4c
mov edx, dword [ebp + 0xc]
mov eax, dword [edx - 4]
sub eax, ebx
inc ebx
lea ecx, [eax + eax*4]
mov eax, dword [edx + ecx*8 + 8]
mov esi, dword [edx + ecx*8 + 0xc]
lea edx, [edx + ecx*8]
add eax, esi
lea ecx, [esi + edi]
add eax, edi
cmp ecx, 0x50b398
ja 0x4f9b49
cmp eax, 0x50b398
jbe 0x4f9b49
cmp ecx, eax
mov esi, ecx
jae 0x4f9b95
imul esi, esi, 0x19660d
mov ebx, dword [ecx]
add esi, 0x3c6ef375
xor ebx, esi
mov dword [ecx], ebx
add ecx, 4
cmp ecx, eax
jb 0x4f9b7c
mov ebx, dword [edx + 0xc]
mov edx, dword [ebx + edi]
add ebx, edi
mov dword [ebp - 8], edx
mov esi, dword [ebx + 4]
mov eax, dword [ebx + 8]
push esi
push 0x40
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp - 0x10], edi
je 0x4f9bc6
cmp esi, 0x10000
jbe 0x4f9bd7
push 0
push 0
push 0
push 0xef0000fe
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov ecx, esi
lea esi, [ebx + 0xc]
mov edx, ecx
mov eax, dword [ebp - 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push esi
push ebx
push eax
push edi
call fcn.004f99b0
cmp eax, esi
je 0x4f9c14
push 0
push 0
push 0
push 0xef0000f8
call dword [sym.imp.KERNEL32.dll_RaiseException]
push esi
push ebx
push 0
call fcn.004f9895
mov ecx, dword [ebp - 0x14]
add esp, 0xc
cmp eax, ecx
je 0x4f9c38
push 0
push 0
push 0
push 0xef0000fa
call dword [sym.imp.KERNEL32.dll_RaiseException]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x50b388
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
jne 0x4f9c5e
push eax
push eax
push eax
push 0xef0000fd
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x50b370
push esi
call ebx
push 0x50b35c
push esi
mov dword [0x50c710], eax
call ebx
mov esi, eax
mov eax, dword [0x50c710]
test eax, eax
jne 0x4f9c95
push 0
push 0
push 0
push 0xef0000fc
call dword [sym.imp.KERNEL32.dll_RaiseException]
call esi
mov ebx, dword [ebp + 8]
mov dword [0x50c72c], eax
mov edx, 3
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x18]
mov eax, dword [ecx - 4]
sub eax, edx
inc edx
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
add eax, ecx
add ecx, esi
add eax, esi
cmp ecx, ebx
jae 0x4f9ca4
cmp ebx, eax
jae 0x4f9ca4
lea ecx, [ebx + 0xc]
mov edx, ebx
and ecx, 0xfffffffc
cmp ecx, eax
jae 0x4f9cef
imul edx, edx, 0x19660d
mov esi, dword [ecx]
add edx, 0x3c6ef375
xor esi, edx
mov dword [ecx], esi
add ecx, 4
cmp ecx, eax
jb 0x4f9cd6
mov esi, dword [ebx + 4]
mov ecx, dword [ebx]
mov edx, dword [ebx + 8]
push esi
push 0x40
mov dword [ebp + 8], ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], edx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp - 0x14], edi
je 0x4f9d1a
cmp esi, 0x10000
jbe 0x4f9d2b
push 0
push 0
push 0
push 0xef0000ff
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov ecx, esi
lea esi, [ebx + 0xc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
push esi
push ebx
push ecx
mov ecx, dword [ebp - 4]
push edi
call fcn.004f99b0
cmp eax, esi
je 0x4f9d68
push 0
push 0
push 0
push 0xef0000f9
call dword [sym.imp.KERNEL32.dll_RaiseException]
push esi
push ebx
push 0
call fcn.004f9895
mov ecx, dword [ebp - 0x10]
add esp, 0xc
cmp eax, ecx
je 0x4f9d8c
push 0
push 0
push 0
push 0xef0000fb
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov edx, dword [0x50c72c]
push esi
push ebx
push edx
call dword [0x50c710]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call esi
mov eax, dword [ebp - 4]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x50cee8
call esi
push 0x50c9e0
call esi
call fcn.004fa6f0
push 0x80
call 0x501be0
add esp, 4
test eax, eax
pop edi
pop esi
pop ebx
je 0x4f9de0
mov ecx, eax
call fcn.004fa4f0
jmp 0x4f9de2
xor eax, eax
mov ecx, 0x4f9e40
mov dword [ecx + 4], eax
call fcn.00502422
mov dword [0x5119d4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [eax - 4]
mov dword [0x50c73c], eax
mov dword [0x50c738], edx
mov esp, ebp
pop ebp
ret 8