Function at 0x401050
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x2dc
push ebx
push ebp
push esi
lea eax, [esp + 0x28]
push edi
push eax
mov dword [esp + 0x30], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x401312
mov eax, dword [esp + 0x3c]
cmp eax, 2
jne 0x401222
push 0x4050e0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x10], ebp
je 0x401312
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4050d0
push ebp
call esi
mov ebx, eax
push 0x4050bc
push ebp
mov dword [esp + 0x24], ebx
call esi
mov edi, eax
push 0x4050a4
push ebp
mov dword [esp + 0x28], edi
call esi
test ebx, ebx
mov dword [esp + 0x28], eax
je 0x401142
test edi, edi
je 0x401142
test eax, eax
je 0x401142
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov eax, 0x400
xor edi, edi
mov dword [esp + 0x14], eax
test edi, edi
je 0x401107
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x14]
lea eax, [ecx + ecx]
mov dword [esp + 0x14], eax
push eax
push 0
call ebx
push eax
call esi
mov edi, eax
test edi, edi
je 0x401142
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push eax
push edi
call dword [esp + 0x28]
test eax, eax
je 0x401136
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
cmp ecx, eax
jne 0x401148
jmp 0x4010ec
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebp
jmp 0x40130c
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], 0
shr eax, 2
mov dword [esp + 0x18], eax
je 0x4011fd
mov ebp, edi
mov byte [esp + 0x1e8], 0
mov ecx, dword [ebp]
push ecx
push 1
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4011c0
lea edx, [esp + 0x14]
lea eax, [esp + 0x24]
push edx
push 4
push eax
push esi
call dword [esp + 0x30]
test eax, eax
je 0x4011b9
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x1e8]
push 0x104
push ecx
push edx
push esi
call dword [esp + 0x38]
test eax, eax
jne 0x4011b9
mov byte [esp + 0x1e8], al
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2f4]
mov edx, dword [ebp]
lea ecx, [esp + 0x1e8]
push eax
push ecx
push 0
push edx
call dword [esp + 0x300]
test eax, eax
jne 0x4011f9
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
inc eax
add ebp, 4
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x401163
mov ebp, dword [esp + 0x10]
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2dc
ret 8
cmp eax, 1
jne 0x401312
push 0x405094
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [esp + 0x10], edi
je 0x401312
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x405078
push edi
call esi
push 0x405068
push edi
mov ebp, eax
call esi
push 0x405058
push edi
mov ebx, eax
call esi
mov edi, eax
test edi, edi
je 0x401307
test ebx, ebx
je 0x401307
test ebp, ebp
je 0x401307
push 0
push 2
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x401294
mov eax, dword [esp + 0x10]
push eax
jmp 0x40130c
lea ecx, [esp + 0xc0]
mov ebp, 0x128
push ecx
push esi
mov dword [esp + 0xc8], ebp
call ebx
test eax, eax
je 0x4012ea
mov ebx, dword [esp + 0x2f4]
mov eax, dword [esp + 0xc8]
lea edx, [esp + 0xe4]
push ebx
push edx
push 0
push eax
call dword [esp + 0x300]
test eax, eax
jne 0x4012ea
lea ecx, [esp + 0xc0]
mov dword [esp + 0xc0], ebp
push ecx
push esi
call edi
test eax, eax
jne 0x4012b6
mov ebp, dword [esp + 0x10]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2dc
ret 8
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2dc
ret 8