Function at 0x10020af0
Capabilities:
Create process on windows
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3830
call fcn.10033810
mov eax, dword [0x10042074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x37d4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x37d0], eax
mov dword [ebp - 0x37c4], 0
push ebx
push esi
push edi
test ecx, ecx
jne 0x10020b98
lea eax, [ebp - 0x188]
push 0x104
push eax
call fcn.1001eb60
add esp, 8
test eax, eax
je 0x100210a8
lea eax, [ebp - 0x188]
push 0x5c
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x10020b7f
lea ecx, [eax + 1]
lea edx, [ebp - 0x84]
sub edx, ecx
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x10020b70
jmp 0x10020bad
xor ecx, ecx
mov al, byte [ebp + ecx - 0x188]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x85], al
test al, al
jne 0x10020b81
jmp 0x10020bad
lea edx, [ebp - 0x84]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x10020ba0
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsupr]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 4
mov dword [ebp - 0x37cc], 0
push 0x1003935c
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x10020bfb
push str.WTSGetActiveConsoleSessionId
push ebx
call esi
test eax, eax
je 0x10020bf4
call eax
mov dword [ebp - 0x37cc], eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x37b8]
push eax
lea eax, [ebp - 0x37c8]
push eax
call fcn.1001e100
mov eax, dword [ebp - 0x37c8]
add esp, 8
mov dword [ebp - 0x3720], 0x94
lea ecx, [eax + eax*4]
mov eax, dword [ebp - 0x37b8]
lea ebx, [eax + ecx*2]
lea eax, [ebp - 0x3720]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x100210bb
cmp dword [ebp - 0x3710], 2
jne 0x100210bb
cmp ebx, 0x33
jae 0x10020e32
push str.PSAPI.DLL
call edi
mov ebx, eax
mov dword [ebp - 0x37bc], ebx
test ebx, ebx
je 0x100210a8
push str.EnumProcesses
push ebx
call esi
push str.EnumProcessModules
push ebx
mov edi, eax
call esi
push str.GetModuleFileNameExA
push ebx
mov dword [ebp - 0x37b8], eax
call esi
mov dword [ebp - 0x37cc], eax
test edi, edi
je 0x10020ca6
cmp dword [ebp - 0x37b8], 0
je 0x10020ca6
test eax, eax
jne 0x10020cad
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x37d8]
push eax
push 0x2000
lea eax, [ebp - 0x368c]
push eax
call edi
xor edi, edi
cmp dword [ebp - 0x37d8], edi
jle 0x10020e14
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
nop word [eax + eax]
mov esi, dword [ebp + edi*4 - 0x368c]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, esi
je 0x10020d6b
push esi
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x10020d6b
lea eax, [ebp - 0x37ec]
push eax
push 0x1000
lea eax, [ebp - 0x168c]
push eax
push esi
call dword [ebp - 0x37b8]
test eax, eax
je 0x10020d68
push 0x104
lea eax, [ebp - 0x28c]
push eax
push dword [ebp - 0x168c]
push esi
call dword [ebp - 0x37cc]
test eax, eax
je 0x10020d68
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsupr]
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsstr]
add esp, 0xc
test eax, eax
jne 0x10020d9c
push esi
call ebx
inc edi
cmp edi, dword [ebp - 0x37d8]
jl 0x10020ce0
mov ebx, dword [ebp - 0x37bc]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x37c4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x37c0]
push eax
push 0xf
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10020de1
push esi
call ebx
mov ebx, dword [ebp - 0x37bc]
push ebx
mov dword [ebp - 0x37c4], 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x37c4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
push 1
push dword [ebp - 0x37d0]
push dword [ebp - 0x37d4]
push dword [ebp - 0x37c0]
call fcn.10021170
add esp, 0x10
mov dword [ebp - 0x37c4], eax
push dword [ebp - 0x37c0]
call ebx
push esi
call ebx
mov ebx, dword [ebp - 0x37bc]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x37c4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
push str.Kernel32.DLL
call edi
mov dword [ebp - 0x37bc], eax
test eax, eax
je 0x100210a8
push str.CreateToolhelp32Snapshot
push eax
call esi
push str.Process32First
push dword [ebp - 0x37bc]
mov ebx, eax
call esi
push str.Process32Next
push dword [ebp - 0x37bc]
mov dword [ebp - 0x37b8], eax
call esi
mov dword [ebp - 0x37e4], eax
test eax, eax
je 0x1002109c
cmp dword [ebp - 0x37b8], 0
je 0x1002109c
test ebx, ebx
je 0x1002109c
push str.Advapi32.DLL
call edi
mov edi, eax
mov dword [ebp - 0x37e8], edi
test edi, edi
je 0x1002109c
push 0x100395c4
push edi
call esi
push 0x100395d8
push edi
mov dword [ebp - 0x37c8], eax
call esi
cmp dword [ebp - 0x37c8], 0
mov dword [ebp - 0x37dc], eax
je 0x10021078
test eax, eax
je 0x10021078
push 0
push 2
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10021050
lea eax, [ebp - 0x37b4]
mov dword [ebp - 0x37b4], 0x128
push eax
push ebx
call dword [ebp - 0x37b8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10021047
xor ecx, ecx
mov al, byte [ebp + ecx - 0x3790]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x68d], al
test al, al
jne 0x10020f15
lea eax, [ebp - 0x68c]
push 0x5c
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x10020f5d
lea ecx, [eax + 1]
lea edx, [ebp - 0x68c]
sub edx, ecx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x10020f50
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x68c]
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x10021002
push dword [ebp - 0x37ac]
push eax
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
je 0x10021002
lea eax, [ebp - 0x37c0]
mov dword [ebp - 0x37c0], 0xffffffff
push eax
push 0xb
push esi
call dword [ebp - 0x37dc]
test eax, eax
je 0x10020fff
lea eax, [ebp - 0x37e0]
mov dword [ebp - 0x37e0], 0
push eax
push 4
lea eax, [ebp - 0x37b8]
mov dword [ebp - 0x37b8], 0
push eax
push 0xc
push dword [ebp - 0x37c0]
call dword [ebp - 0x37c8]
test eax, eax
je 0x10020ff7
mov eax, dword [ebp - 0x37cc]
cmp eax, dword [ebp - 0x37b8]
je 0x1002101a
push dword [ebp - 0x37c0]
call edi
push esi
call edi
lea eax, [ebp - 0x37b4]
push eax
push ebx
call dword [ebp - 0x37e4]
test eax, eax
jne 0x10020f13
jmp 0x10021047
push 1
push dword [ebp - 0x37d0]
push dword [ebp - 0x37d4]
push dword [ebp - 0x37c0]
call fcn.10021170
add esp, 0x10
mov dword [ebp - 0x37c4], eax
push dword [ebp - 0x37c0]
call edi
push esi
call edi
push ebx
call edi
mov edi, dword [ebp - 0x37e8]
push dword [ebp - 0x37bc]
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call ebx
push edi
call ebx
mov eax, dword [ebp - 0x37c4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x37bc]
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call ebx
push edi
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x37bc]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100337f6
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x37d0]
lea eax, [ebp - 0x3830]
mov dword [ebp - 0x3830], 0x44
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x37d4]
mov dword [ebp - 0x382c], 0
push 0
mov dword [ebp - 0x37fc], 0
mov dword [ebp - 0x3800], 5
mov dword [ebp - 0x3828], 0
mov dword [ebp - 0x3824], 0
mov dword [ebp - 0x3804], 0
mov dword [ebp - 0x3820], 0
mov dword [ebp - 0x381c], 0
mov dword [ebp - 0x3808], 0
mov dword [ebp - 0x37f8], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100337f6
mov esp, ebp
pop ebp
ret