Function at 0x406160
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0xb90
push ebx
push ebp
push esi
push edi
push 0xfa0
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, dword [esp + 0xba4]
mov ebp, eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea ecx, [edi - 1]
cmp ecx, 0x103
ja 0x4064e4
xor esi, esi
test edi, edi
jle 0x4061c6
lea eax, [esp + 0x13c]
sub ebx, eax
lea eax, [ebx + esi*2]
movzx eax, word [esp + eax + 0x13c]
push eax
call fcn.004072c3
mov word [esp + esi*2 + 0x140], ax
inc esi
pop ecx
cmp esi, edi
jl 0x4061a7
xor eax, eax
mov dword [esp + 0x28], 0x114
mov word [esp + edi*2 + 0x13c], ax
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4061f1
mov eax, 0x25e
jmp 0x4064e9
cmp dword [esp + 0x38], 2
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x4062d8
cmp dword [esp + 0x38], 1
je 0x406213
mov eax, 0x25f
jmp 0x4064e9
mov esi, dword [esp + 0x1c]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ebp, ebp
inc ebp
cmp dword [esp + 0x38], ebp
jne 0x4064ad
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x4062e9
push str.CreateToolhelp32Snapshot
push esi
call edi
push str.Process32FirstW
push esi
mov dword [esp + 0x20], eax
call edi
push str.Process32NextW
push esi
mov ebx, eax
call edi
push str.Module32FirstW
push esi
mov dword [esp + 0x1c], eax
call edi
push str.Module32NextW
push esi
mov dword [esp + 0x18], eax
call edi
cmp dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
je 0x4064d8
test ebx, ebx
je 0x4064d8
test eax, eax
je 0x4064d8
cmp dword [esp + 0x10], 0
je 0x4064d8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4064d8
push 0
push 2
call eax
mov edi, eax
cmp edi, 0xffffffff
je 0x4064d8
lea eax, [esp + 0x344]
mov dword [esp + 0x344], 0x22c
push eax
push edi
call ebx
jmp 0x40649e
push str.PSAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x4062f3
mov eax, 0x25d
jmp 0x4064e9
push str.EnumProcesses
push esi
call edi
push str.EnumProcessModules
push esi
mov ebx, eax
call edi
push str.GetModuleBaseNameW
push esi
mov dword [esp + 0x20], eax
call edi
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x4064d8
cmp dword [esp + 0x18], 0
je 0x4064d8
test eax, eax
je 0x4064d8
lea eax, [esp + 0x20]
push eax
push 0x3e8
push ebp
call ebx
test eax, eax
jne 0x40634b
mov edi, 0x25d
jmp 0x406402
mov ebx, dword [esp + 0x20]
and dword [esp + 0x10], 0
shr ebx, 2
test ebx, ebx
je 0x406217
push str.Unknown
lea eax, [esp + 0x574]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esp + 0x10]
push dword [ebp + eax*4]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4063c1
lea ecx, [esp + 0x20]
push ecx
push 4
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [esp + 0x28]
test eax, eax
je 0x4063bd
push 0x104
lea eax, [esp + 0x574]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x20]
call dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x570]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
lea ecx, [esp + 0x13c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4063ff
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, ebx
jb 0x40635f
jmp 0x406217
xor edi, edi
inc edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, edi
jmp 0x4064e9
push dword [esp + 0x34c]
push 8
call dword [esp + 0x20]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4064c1
lea eax, [esp + 0x778]
mov dword [esp + 0x778], 0x428
push eax
push ebx
call dword [esp + 0x18]
jmp 0x40647b
lea eax, [esp + 0x13c]
push eax
lea eax, [esp + 0x79c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4064b8
lea eax, [esp + 0x778]
mov dword [esp + 0x778], 0x428
push eax
push ebx
call dword [esp + 0x24]
test eax, eax
jne 0x406449
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x344]
mov dword [esp + 0x344], 0x22c
push eax
push edi
call dword [esp + 0x1c]
test eax, eax
jne 0x406417
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x4064e9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4064c6
mov ebp, 0x25d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, ebp
jmp 0x4064e9
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4062e9
mov eax, 0x278
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb90
ret 4