Function at 0x40f318
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e4
mov dword [ebp - 0xd8], 0
lea eax, [ebp - 0xc8]
push eax
lea ecx, [ebp - 0x1a0]
push ecx
call fcn.00404ad0
mov dword [ebp - 0xd8], eax
cmp dword [ebp - 0xd8], 0
je 0x40f358
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
cmp dword [ebp - 0x19c], 3
jne 0x40f827
push 0x5331b0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 0
jne 0x40f3b8
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 1
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
push 0x5331c0
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd4], eax
cmp dword [ebp - 0xd4], 0
jne 0x40f412
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
push 0x5331d8
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xcc], eax
cmp dword [ebp - 0xcc], 0
jne 0x40f46c
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
push 0x5331f0
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 0
jne 0x40f4c6
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
push 0x533214
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c4], eax
cmp dword [ebp - 0x1c4], 0
jne 0x40f520
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
push 0x533230
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0
jne 0x40f57a
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
push 4
push 0
push 0
push 0
call dword [ebp - 0xd4]
mov dword [ebp - 0x1c8], eax
cmp dword [ebp - 0x1c8], 0xffffffff
jne 0x40f5d0
push 8
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
mov dword [ebp - 0x1bc], 0x1c
mov dword [ebp - 0x1c0], 0
jmp 0x40f5f5
mov edx, dword [ebp - 0x1c0]
add edx, 1
mov dword [ebp - 0x1c0], edx
lea eax, [ebp - 0x1bc]
push eax
mov ecx, dword [ebp - 0x1c0]
push ecx
mov edx, dword [ebp - 0x1c8]
push edx
call dword [ebp - 0xcc]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0
je 0x40f7fd
mov dword [ebp - 0x1e0], 0
mov dword [ebp - 0x1e4], 0
lea eax, [ebp - 0x1e4]
push eax
mov ecx, dword [ebp - 0x1e4]
push ecx
mov edx, dword [ebp - 0x1e0]
push edx
lea eax, [ebp - 0x1dc]
push eax
push 1
lea ecx, [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0x1c8]
push edx
call dword [ebp - 0xd0]
test eax, eax
jne 0x40f6f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x40f67e
jmp 0x40f6f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40f6b6
cmp dword [ebp - 0x1e0], 0
je 0x40f69f
mov eax, dword [ebp - 0x1e0]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x1e4]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1e0], eax
jmp 0x40f6ef
push 9
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
jmp 0x40f637
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x40f704
jmp 0x40f5e6
mov eax, dword [ebp - 0x1e0]
mov dword [ebp - 0x1d8], eax
jmp 0x40f72f
mov ecx, dword [ebp - 0x1d8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp - 0x1d8]
lea eax, [edx + eax + 1]
mov dword [ebp - 0x1d8], eax
mov ecx, dword [ebp - 0x1d8]
movsx edx, byte [ecx]
test edx, edx
je 0x40f7e2
mov eax, dword [ebp - 0x1e0]
add eax, dword [ebp - 0x1e4]
cmp dword [ebp - 0x1d8], eax
jae 0x40f7e2
mov ecx, dword [ebp - 0x1d8]
push ecx
push str.MFHLKPCMCIA_DEV0
call fcn.00420970
add esp, 8
test eax, eax
je 0x40f788
mov edx, dword [ebp - 0x1d8]
push edx
push str.MFHSPCMCIA_DEV0
call fcn.00420970
add esp, 8
test eax, eax
jne 0x40f7dd
lea eax, [ebp - 0x1bc]
push eax
mov ecx, dword [ebp - 0x1c8]
push ecx
push 5
call dword [ebp - 0x1c4]
test eax, eax
jne 0x40f7d8
push 9
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
jmp 0x40f82d
jmp 0x40f712
jmp 0x40f712
cmp dword [ebp - 0x1e0], 0
je 0x40f7f8
mov eax, dword [ebp - 0x1e0]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40f5e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40f80d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x1c8]
push ecx
call dword [ebp - 0x1d4]
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
mov esp, ebp
pop ebp
ret