Function at 0x10004dc0
Capabilities:
Encode data using xor
Get memory capacity
Get system information on windows
Link many functions at runtime
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x4570
call fcn.10014030
mov eax, dword [0x1001a050]
xor eax, esp
mov dword [esp + 0x456c], eax
push ebx
push edi
test esi, esi
jne 0x10004dfb
lea eax, [esi + 2]
pop edi
pop ebx
mov ecx, dword [esp + 0x456c]
xor ecx, esp
call fcn.1000f5b7
mov esp, ebp
pop ebp
ret
push 0x40
push 0
push esi
call fcn.10012fe0
add esp, 0xc
push 0x10018ab8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x10004ee6
push str.CryptAcquireContextW
push ebx
mov dword [esp + 0x10], 0
call edi
push str.CryptGenRandom
push ebx
mov dword [esp + 0x14], eax
call edi
push str.CryptReleaseContext
push ebx
mov dword [esp + 0x18], eax
call edi
mov ebx, eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x10004ee6
cmp dword [esp + 0x10], 0
je 0x10004ee6
test ebx, ebx
je 0x10004ee6
push 0xf0000040
push 1
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
call eax
test eax, eax
je 0x10004ee6
push 0x4000
lea edx, [esp + 0x574]
push 0
push edx
call fcn.10012fe0
mov ecx, dword [esp + 0x14]
add esp, 0xc
lea eax, [esp + 0x570]
push eax
push 0x4000
push ecx
call dword [esp + 0x1c]
test eax, eax
je 0x10004edd
lea edx, [esp + 0x570]
push edx
mov edx, esi
mov ecx, 0x4000
call fcn.10004d40
add esp, 4
push 0x4000
lea eax, [esp + 0x574]
push 0
push eax
call fcn.10012fe0
add esp, 0xc
mov ecx, dword [esp + 8]
push 0
push ecx
call ebx
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea eax, [esp + 0x58]
push eax
mov edx, esi
mov ecx, 0x24
call fcn.10004d40
xor eax, eax
add esp, 4
lea ecx, [esp + 0x108]
push ecx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x10c], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea edx, [esp + 0x108]
push edx
mov edx, esi
mov ecx, 0x9c
call fcn.10004d40
add esp, 4
push 0x9c
lea eax, [esp + 0x10c]
push 0
push eax
call fcn.10012fe0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0xc]
push ecx
mov edx, esi
mov ecx, 4
mov dword [esp + 0x10], eax
call fcn.10004d40
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0xc]
push edx
mov edx, esi
mov ecx, 4
mov dword [esp + 0x10], eax
call fcn.10004d40
add esp, 4
lea eax, [esp + 0xc8]
push eax
mov dword [esp + 0xcc], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
lea ecx, [esp + 0xc8]
push ecx
mov edx, esi
mov ecx, 0x40
call fcn.10004d40
add esp, 4
push 0x40
lea edx, [esp + 0xcc]
push 0
push edx
call fcn.10012fe0
add esp, 0xc
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
lea ecx, [esp + 0x30]
push ecx
mov edx, esi
mov ecx, 8
call fcn.10004d40
add esp, 4
xor eax, eax
lea edx, [esp + 0x38]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [esp + 0x38]
push eax
mov edx, esi
mov ecx, 8
call fcn.10004d40
add esp, 4
xor eax, eax
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea edx, [esp + 0x50]
push edx
mov edx, esi
mov ecx, 8
call fcn.10004d40
xor eax, eax
add esp, 4
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
mov edx, esi
mov ecx, 4
call fcn.10004d40
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0xc]
push ecx
mov edx, esi
mov ecx, 4
mov dword [esp + 0x10], eax
call fcn.10004d40
add esp, 4
lea edx, [esp + 0x9c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [esp + 0x9c]
push eax
mov edx, esi
mov ecx, 0x10
call fcn.10004d40
xor eax, eax
add esp, 4
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
lea edx, [esp + 0x8c]
push edx
mov edx, esi
mov ecx, 0x10
call fcn.10004d40
xor eax, eax
add esp, 4
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
xor ebx, ebx
mov eax, dword [ebx + 0x100180c8]
push eax
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [esp + ebx + 0x3d0], eax
add ebx, 4
cmp ebx, 0x15c
jb 0x10005131
push 0x40
lea ecx, [esp + 0x3d4]
push 0x15c
push ecx
lea ebx, [esp + 0x53c]
call fcn.10001750
mov ecx, ebx
lea ebx, [esp + 0x53e]
sub ebx, esi
mov dword [esp + 0x18], ebx
lea edx, [esp + 0x53d]
lea ebx, [esp + 0x53f]
add esp, 0xc
sub ecx, esi
sub edx, esi
sub ebx, esi
mov eax, esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 0x10
nop
movzx ebx, byte [ecx + eax]
xor byte [eax], bl
movzx ebx, byte [edx + eax]
xor byte [eax + 1], bl
mov ebx, dword [esp + 0xc]
movzx ebx, byte [ebx + eax]
xor byte [eax + 2], bl
mov ebx, dword [esp + 0x14]
movzx ebx, byte [ebx + eax]
xor byte [eax + 3], bl
add eax, 4
dec dword [esp + 0x10]
jne 0x100051a0
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x100054ff
push str.CreateToolhelp32Snapshot
push ebx
call edi
push str.CloseToolhelp32Snapshot
push ebx
mov dword [esp + 0x10], eax
call edi
push str.Heap32First
push ebx
mov dword [esp + 0x50], eax
call edi
push str.Heap32Next
push ebx
mov dword [esp + 0x34], eax
call edi
push str.Heap32ListFirst
push ebx
mov dword [esp + 0x2c], eax
call edi
push str.Heap32ListNext
push ebx
mov dword [esp + 0x18], eax
call edi
push str.Process32First
push ebx
mov dword [esp + 0x20], eax
call edi
push str.Process32Next
push ebx
mov dword [esp + 0x28], eax
call edi
push str.Thread32First
push ebx
mov dword [esp + 0x30], eax
call edi
push str.Thread32Next
push ebx
mov dword [esp + 0x24], eax
call edi
push str.Module32First
push ebx
mov dword [esp + 0x1c], eax
call edi
push str.Module32Next
push ebx
mov dword [esp + 0x14], eax
call edi
mov ecx, dword [esp + 8]
mov dword [esp + 0x4c], eax
test ecx, ecx
je 0x100054f8
cmp dword [esp + 0x2c], 0
je 0x100054f8
cmp dword [esp + 0x24], 0
je 0x100054f8
cmp dword [esp + 0x10], 0
je 0x100054f8
cmp dword [esp + 0x18], 0
je 0x100054f8
cmp dword [esp + 0x20], 0
je 0x100054f8
cmp dword [esp + 0x28], 0
je 0x100054f8
cmp dword [esp + 0x1c], 0
je 0x100054f8
cmp dword [esp + 0x14], 0
je 0x100054f8
cmp dword [esp + 0xc], 0
je 0x100054f8
test eax, eax
je 0x100054f8
push 0
push 0xf
call ecx
mov edi, eax
mov dword [esp + 0x44], edi
cmp edi, 0xffffffff
je 0x100054f8
lea edx, [esp + 0x7c]
push edx
push edi
mov dword [esp + 0x84], 0x10
call dword [esp + 0x18]
test eax, eax
je 0x100053bf
mov dword [esp + 8], 2
mov ecx, dword [esp + 0x7c]
lea eax, [esp + 0x7c]
push eax
mov edx, esi
call fcn.10004d40
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
add esp, 4
push ecx
push edx
lea eax, [esp + 0x538]
push eax
mov dword [esp + 0x53c], 0x24
call dword [esp + 0x38]
test eax, eax
je 0x100053a2
mov edi, 0x64
jmp 0x10005370
lea ecx, [esp + 0x530]
push ecx
mov ecx, dword [esp + 0x534]
mov edx, esi
call fcn.10004d40
add esp, 4
lea edx, [esp + 0x530]
push edx
dec edi
call dword [esp + 0x28]
test eax, eax
je 0x1000539e
test edi, edi
jne 0x10005370
mov edi, dword [esp + 0x44]
dec dword [esp + 8]
lea eax, [esp + 0x7c]
push eax
push edi
call dword [esp + 0x20]
test eax, eax
je 0x100053bf
cmp dword [esp + 8], 0
ja 0x10005322
lea ecx, [esp + 0x3d0]
push ecx
push edi
mov dword [esp + 0x3d8], 0x128
call dword [esp + 0x28]
test eax, eax
je 0x10005425
mov dword [esp + 8], 0x64
jmp 0x100053f0
mov ecx, dword [esp + 0x3d0]
lea edx, [esp + 0x3d0]
push edx
mov edx, esi
call fcn.10004d40
dec dword [esp + 0xc]
add esp, 4
lea eax, [esp + 0x3d0]
push eax
push edi
call dword [esp + 0x30]
test eax, eax
je 0x10005425
cmp dword [esp + 8], 0
ja 0x100053f0
lea ecx, [esp + 0xac]
push ecx
push edi
mov dword [esp + 0xb4], 0x1c
call dword [esp + 0x24]
test eax, eax
je 0x10005485
mov dword [esp + 8], 0x64
lea esp, [esp]
mov ecx, dword [esp + 0xac]
lea edx, [esp + 0xac]
push edx
mov edx, esi
call fcn.10004d40
dec dword [esp + 0xc]
add esp, 4
lea eax, [esp + 0xac]
push eax
push edi
call dword [esp + 0x1c]
test eax, eax
je 0x10005485
cmp dword [esp + 8], 0
ja 0x10005450
lea ecx, [esp + 0x1a8]
push ecx
push edi
mov dword [esp + 0x1b0], 0x224
call dword [esp + 0x14]
test eax, eax
je 0x100054e5
mov dword [esp + 8], 0x64
lea esp, [esp]
mov ecx, dword [esp + 0x1a8]
lea edx, [esp + 0x1a8]
push edx
mov edx, esi
call fcn.10004d40
dec dword [esp + 0xc]
add esp, 4
lea eax, [esp + 0x1a8]
push eax
push edi
call dword [esp + 0x54]
test eax, eax
je 0x100054e5
cmp dword [esp + 8], 0
ja 0x100054b0
mov eax, dword [esp + 0x48]
push edi
test eax, eax
je 0x100054f2
call eax
jmp 0x100054f8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x4574]
pop edi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.1000f5b7
mov esp, ebp
pop ebp
ret