Function at 0x50fc84
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov ebx, ecx
mov esi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x510253
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
cmp dword [0x5702a8], 0
je 0x50fcbc
mov ebx, dword [0x5702a8]
test ebx, ebx
je 0x510238
lea edi, [esi + esi*2]
cmp dword [ebx + edi*4 + 0xc], 0
jne 0x510234
cmp esi, 2
jne 0x50fd27
lea eax, [ebx + 0x18c]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
mov ecx, 0x49cf2c
mov edx, dword [ebx + edi*4 + 4]
mov eax, ebx
call fcn.00510ea8
mov edx, dword [ebp - 0xc]
lea eax, [ebx + edi*4 + 8]
call fcn.00404778
cmp dword [ebx + edi*4 + 8], 0
je 0x50fd3a
lea eax, [esi + esi*2]
mov eax, dword [ebx + eax*4 + 8]
call fcn.00404bf0
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebx + edi*4 + 0xc], eax
lea eax, [esi + esi*2]
cmp dword [ebx + eax*4 + 0xc], 0
jmp 0x50fd3a
mov eax, dword [ebx + edi*4 + 4]
call fcn.00404bf0
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebx + edi*4 + 0xc], eax
cmp dword [ebx + edi*4 + 0xc], 0
je 0x5101ca
mov eax, esi
cmp eax, 4
ja case.default.0x50fd50
jmp dword [eax*4 + 0x50fd57]
push 0x510264
lea eax, [esi + esi*2]
mov eax, dword [ebx + eax*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d38], eax
push 0x510280
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d3c], eax
push 0x510298
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d40], eax
push 0x5102b0
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d44], eax
cmp dword [0x571d38], 0
je 0x50fde2
cmp dword [0x571d3c], 0
je 0x50fde2
cmp dword [0x571d40], 0
je 0x50fde2
cmp dword [0x571d44], 0
jne 0x50fde6
xor eax, eax
jmp 0x50fde8
mov al, 1
mov byte [ebp - 5], al
jmp case.default.0x50fd50
push 0x5102c0
lea eax, [esi + esi*2]
mov eax, dword [ebx + eax*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d34], eax
cmp dword [0x571d34], 0
setne byte [ebp - 5]
jmp case.default.0x50fd50
push 0x5102cc
lea eax, [esi + esi*2]
mov eax, dword [ebx + eax*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d7c], eax
push 0x5102dc
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d80], eax
push 0x5102f4
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d84], eax
push 0x51030c
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d88], eax
push 0x510320
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d94], eax
push 0x510334
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d8c], eax
push 0x510350
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d90], eax
push 0x510364
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d98], eax
cmp dword [0x571d7c], 0
je 0x50ff02
cmp dword [0x571d88], 0
je 0x50ff02
cmp dword [0x571d94], 0
je 0x50ff02
cmp dword [0x571d98], 0
je 0x50ff02
cmp dword [0x571d80], 0
je 0x50ff02
cmp dword [0x571d84], 0
je 0x50ff02
cmp dword [0x571d8c], 0
je 0x50ff02
cmp dword [0x571d90], 0
jne 0x50ff06
xor eax, eax
jmp 0x50ff08
mov al, 1
mov byte [ebp - 5], al
jmp case.default.0x50fd50
push 0x510374
lea eax, [esi + esi*2]
mov eax, dword [ebx + eax*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571da4], eax
push 0x510384
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571db8], eax
push 0x510390
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571dbc], eax
push 0x5103a4
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571da8], eax
push 0x5103b4
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571dac], eax
push 0x5103c4
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571db0], eax
push 0x5103d4
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571db4], eax
push 0x5103e0
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d9c], eax
push 0x5103e8
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d48], eax
push 0x510400
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d4c], eax
push 0x510414
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d50], eax
push 0x51042c
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d54], eax
push 0x510448
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d58], eax
push 0x510460
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d60], eax
push 0x510474
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d64], eax
push 0x510488
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d68], eax
push 0x5104a0
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d6c], eax
push 0x5104b8
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571da0], eax
push 0x5104cc
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d70], eax
push 0x5104e4
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d74], eax
push 0x5104fc
mov eax, dword [ebx + edi*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d78], eax
cmp dword [0x571da4], 0
je 0x51018c
cmp dword [0x571da8], 0
je 0x51018c
cmp dword [0x571dac], 0
je 0x51018c
cmp dword [0x571db0], 0
je 0x51018c
cmp dword [0x571db4], 0
je 0x51018c
cmp dword [0x571db8], 0
je 0x51018c
cmp dword [0x571dbc], 0
je 0x51018c
cmp dword [0x571d9c], 0
je 0x51018c
cmp dword [0x571d48], 0
je 0x51018c
cmp dword [0x571d4c], 0
je 0x51018c
cmp dword [0x571d50], 0
je 0x51018c
cmp dword [0x571d54], 0
je 0x51018c
cmp dword [0x571d58], 0
je 0x51018c
cmp dword [0x571d60], 0
je 0x51018c
cmp dword [0x571d64], 0
je 0x51018c
cmp dword [0x571d68], 0
je 0x51018c
cmp dword [0x571d70], 0
je 0x51018c
cmp dword [0x571d74], 0
je 0x51018c
cmp dword [0x571d6c], 0
je 0x51018c
cmp dword [0x571da0], 0
je 0x51018c
cmp dword [0x571d78], 0
jne 0x510190
xor eax, eax
jmp 0x510192
mov al, 1
mov byte [ebp - 5], al
jmp case.default.0x50fd50
push 0x51051c
lea eax, [esi + esi*2]
mov eax, dword [ebx + eax*4 + 0xc]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x571d5c], eax
cmp dword [0x571d5c], 0
setne byte [ebp - 5]
cmp byte [ebp - 5], 0
jne 0x510238
lea eax, [esi + esi*2]
xor edx, edx
mov dword [ebx + eax*4 + 0xc], edx
jmp 0x510238
cmp dword [ebp - 4], 0
je 0x51022b
cmp esi, 3
jne 0x5101ed
push 0x2b
push 0x510538
mov ecx, 3
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0053f2d8
jmp 0x51022b
push 0x2b
lea ecx, [ebp - 0x14]
mov edx, 0x2b
mov eax, dword [ebp - 4]
call fcn.00511d10
push dword [ebp - 0x14]
push 0x5105c8
push dword [ebx + edi*4 + 4]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00404ab8
mov eax, dword [ebp - 0x10]
push eax
mov ecx, 3
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0053f2d8
push 0
call sub.KERNEL32.DLL_SetLastError
jmp 0x510238
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51025a
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00404748
ret