Function at 0x405fd3
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 0x406357
xor esi, esi
test edi, edi
jle 0x406039
lea eax, [esp + 0x13c]
sub ebx, eax
lea eax, [ebx + esi*2]
movzx eax, word [esp + eax + 0x13c]
push eax
call fcn.004072ea
mov word [esp + esi*2 + 0x140], ax
inc esi
pop ecx
cmp esi, edi
jl 0x40601a
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 0x406064
mov eax, 0x25e
jmp 0x40635c
cmp dword [esp + 0x38], 2
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x40614b
cmp dword [esp + 0x38], 1
je 0x406086
mov eax, 0x25f
jmp 0x40635c
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 0x406320
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x40615c
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 0x40634b
test ebx, ebx
je 0x40634b
test eax, eax
je 0x40634b
cmp dword [esp + 0x10], 0
je 0x40634b
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40634b
push 0
push 2
call eax
mov edi, eax
cmp edi, 0xffffffff
je 0x40634b
lea eax, [esp + 0x344]
mov dword [esp + 0x344], 0x22c
push eax
push edi
call ebx
jmp 0x406311
push str.PSAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x406166
mov eax, 0x25d
jmp 0x40635c
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 0x40634b
cmp dword [esp + 0x18], 0
je 0x40634b
test eax, eax
je 0x40634b
lea eax, [esp + 0x20]
push eax
push 0x3e8
push ebp
call ebx
test eax, eax
jne 0x4061be
mov edi, 0x25d
jmp 0x406275
mov ebx, dword [esp + 0x20]
and dword [esp + 0x10], 0
shr ebx, 2
test ebx, ebx
je 0x40608a
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 0x406234
lea ecx, [esp + 0x20]
push ecx
push 4
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [esp + 0x28]
test eax, eax
je 0x406230
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 0x406272
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, ebx
jb 0x4061d2
jmp 0x40608a
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 0x40635c
push dword [esp + 0x34c]
push 8
call dword [esp + 0x20]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406334
lea eax, [esp + 0x778]
mov dword [esp + 0x778], 0x428
push eax
push ebx
call dword [esp + 0x18]
jmp 0x4062ee
lea eax, [esp + 0x13c]
push eax
lea eax, [esp + 0x79c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40632b
lea eax, [esp + 0x778]
mov dword [esp + 0x778], 0x428
push eax
push ebx
call dword [esp + 0x24]
test eax, eax
jne 0x4062bc
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 0x40628a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x40635c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406339
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 0x40635c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40615c
mov eax, 0x278
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb90
ret 4