Function at 0x50c66c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb9c
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x45c], eax
mov dword [ebp - 0x460], eax
mov dword [ebp - 0x464], eax
mov dword [ebp - 0x458], eax
xor eax, eax
push ebp
push 0x50c93c
push dword fs:[eax]
mov dword fs:[eax], esp
or ebx, 0xffffffff
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x50c8f4
push 0x50c94c
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
test esi, esi
je 0x50c8f2
push 0x50c95c
push esi
call sub.kernel32.dll_GetProcAddress_1
mov edi, eax
mov dword [ebp - 4], edi
push 0x50c974
push esi
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 8], eax
push 0x50c994
push esi
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 0xc], eax
push 0x50c9ac
push esi
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 0x10], eax
push 0x50c9d0
push esi
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 0x14], eax
test edi, edi
je 0x50c8ee
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x50c8f4
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
xor edx, edx
push ebp
push 0x50c8d4
push dword fs:[edx]
mov dword fs:[edx], esp
push 4
push 0
lea ecx, [ebp - 0x458]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [ebp - 0x30]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x458]
call fcn.00405bcc
push eax
push 0
call dword [ebp - 4]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x50]
xor ecx, ecx
mov edx, 0x1c
call fcn.00403b7c
mov dword [ebp - 0x50], 0x1c
lea eax, [ebp - 0x451]
xor ecx, ecx
mov edx, 0x401
call fcn.00403b7c
lea edx, [ebp - 0x50]
lea eax, [ebp - 0x451]
mov ecx, 0x1c
call fcn.00408d7c
lea eax, [ebp - 0x451]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
xor esi, esi
cmp dword [ebp - 0xc], 0
je 0x50c8b3
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 0xc]
test eax, eax
je 0x50c8a7
cmp dword [ebp - 0x10], 0
je 0x50c8a3
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
lea eax, [ebp - 0x24]
push eax
push 1
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 0x10]
cmp dword [ebp - 0x2c], 0
jbe 0x50c8ae
mov eax, dword [ebp - 0x2c]
call fcn.00402f38
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
push 1
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 0x10]
lea ecx, [ebp - 0x460]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [ebp - 0x30]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x460]
call fcn.00405bcc
mov edx, eax
lea eax, [ebp - 0x45c]
call fcn.00406080
mov eax, dword [ebp - 0x45c]
push eax
lea eax, [ebp - 0x464]
mov edx, dword [ebp - 0x28]
call fcn.00406080
mov edx, dword [ebp - 0x464]
pop eax
call fcn.00406460
dec eax
jne 0x50c899
cmp dword [ebp - 0x14], 0
je 0x50c897
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 0x14]
jmp 0x50c899
xor ebx, ebx
mov eax, dword [ebp - 0x28]
call fcn.00402f54
jmp 0x50c8ae
xor ebx, ebx
jmp 0x50c8ae
call sub.kernel32.dll_GetLastError_1
mov esi, eax
inc dword [ebp - 0x20]
jmp 0x50c8b5
xor ebx, ebx
test esi, esi
je 0x50c7be
cmp dword [ebp - 8], 0
je 0x50c8ca
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50c8e0
inc dword [ebp - 0x30]
dec dword [ebp - 0x34]
jne 0x50c739
jmp 0x50c8f4
xor ebx, ebx
jmp 0x50c8f4
xor ebx, ebx
test ebx, ebx
jne 0x50c902
mov eax, 0x50c9ec
call fcn.0044d130
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50c943
lea eax, [ebp - 0x464]
call fcn.00405f44
lea eax, [ebp - 0x460]
call fcn.0040573c
lea eax, [ebp - 0x45c]
call fcn.00405f44
lea eax, [ebp - 0x458]
call fcn.0040573c
ret