Function at 0x5a0210
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x248
push ebx
push ebp
push esi
push edi
push 4
push 0x1000
push 0x10000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
jne 0x5a024e
mov eax, dword [esp + 0x25c]
mov dword [eax], edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x248
ret
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.psapi.dll
call ebx
mov esi, eax
test esi, esi
mov dword [esp + 0x20], esi
je 0x5a03c9
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcessModules
push esi
call ebx
push str.GetModuleBaseNameA
push esi
mov ebp, eax
call ebx
push str.GetModuleInformation
push esi
mov dword [esp + 0x24], eax
call ebx
test ebp, ebp
mov dword [esp + 0x24], eax
lea ebx, [edi + 0xf000]
je 0x5a052a
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x5a052a
test eax, eax
je 0x5a052a
lea ecx, [esp + 0x10]
push ecx
push 0x1000
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebp
test eax, eax
je 0x5a052a
mov eax, dword [esp + 0x10]
mov esi, edi
cmp eax, 0x1000
jbe 0x5a02e5
mov eax, 0x1000
mov dword [esp + 0x10], eax
sub edi, eax
push eax
add edi, 0x10000
push ebx
push edi
call fcn.005b5460
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
shr eax, 2
add esp, 0xc
lea edx, [eax + eax*2]
shl edx, 2
sub ebx, edx
add ebx, 0xfff4
mov dword [esp + 0x18], ebx
mov ebp, dword [edi]
mov eax, ebx
sub eax, esi
add edi, 4
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [esp + 0x2c]
test eax, eax
je 0x5a0389
lea ecx, [esp + 0x28]
push 0xc
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [esp + 0x34]
test eax, eax
je 0x5a0389
mov ebp, dword [esp + 0x18]
xor ecx, ecx
mov dword [ebp], esi
mov dl, byte [esi]
inc esi
test dl, dl
je 0x5a0374
mov dl, byte [esi - 1]
lea eax, [esi - 1]
cmp dl, 0x2e
jne 0x5a0364
mov ecx, eax
mov al, byte [esi]
inc esi
test al, al
jne 0x5a0357
test ecx, ecx
je 0x5a0374
mov byte [ecx], al
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
add ebp, 0xc
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x10]
sub eax, 4
mov dword [esp + 0x10], eax
jne 0x5a0315
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
push ecx
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [esp + 0x25c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov dword [edx], eax
mov eax, ebx
pop ebp
pop ebx
add esp, 0x248
ret
push str.kernel32.dll
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.CreateToolhelp32Snapshot
push esi
mov dword [esp + 0x20], esi
call ebx
push str.Module32First
push esi
mov ebp, eax
call ebx
push str.Module32Next
push esi
mov dword [esp + 0x24], eax
call ebx
test ebp, ebp
mov dword [esp + 0x20], eax
je 0x5a052a
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x5a052a
test eax, eax
je 0x5a052a
push 0
push 8
call ebp
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x5a052a
lea ecx, [esp + 0x34]
lea ebp, [edi + 0xfff4]
push ecx
push eax
mov ebx, edi
mov dword [ebp], 0
mov dword [esp + 0x3c], 0x224
call dword [esp + 0x24]
test eax, eax
je 0x5a0502
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, edx
lea edx, [ebp - 0xc]
cmp ecx, edx
jae 0x5a04fe
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
sub ebp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp], ebx
mov cl, byte [ebx]
inc ebx
test cl, cl
je 0x5a04aa
mov dl, byte [ebx]
inc ebx
test dl, dl
jne 0x5a04a3
mov cl, byte [ebx - 1]
lea eax, [ebx - 1]
cmp cl, 0x2e
jne 0x5a04bf
test eax, eax
je 0x5a04bf
mov byte [eax], 0
lea ebx, [eax + 1]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x34]
mov dword [ebp + 8], ecx
push edx
push eax
call dword [esp + 0x28]
test eax, eax
je 0x5a04fa
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, ebx
cmp ecx, edx
jb 0x5a0475
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x25c]
mov eax, ebp
mov dword [ecx], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [esp + 0x25c]
pop edi
pop esi
pop ebp
mov dword [edx], 0
xor eax, eax
pop ebx
add esp, 0x248
ret