Function at 0x51d484
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
mov dword [ebp - 4], eax
lea esi, [ebp - 4]
xor eax, eax
push ebp
push 0x51d76b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [esi]
call fcn.0051d89c
mov eax, dword [esi]
cmp byte [eax + 0x14], 0
jne 0x51d4b9
mov eax, dword [esi]
call fcn.0051c2d8
mov eax, dword [esi]
cmp byte [eax + 0x14], 0
je 0x51d748
mov eax, dword [esi]
cmp byte [eax + 0x17], 1
jne 0x51d61d
cmp dword [0x66bfb8], 0
jne 0x51d5c0
lea edx, [ebp - 8]
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
call fcn.006548ec
lea eax, [ebp - 8]
mov edx, 0x51d77c
call fcn.00403ac4
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_LoadLibraryW
mov dword [0x66bfb8], eax
cmp dword [0x66bfb8], 0
je 0x51d748
push 0x51d798
mov eax, dword [0x66bfb8]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x66bfc4], eax
push 0x51d7ac
mov eax, dword [0x66bfb8]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x66bfc8], eax
push 0x51d7c4
mov eax, dword [0x66bfb8]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x66bfcc], eax
push 0x51d7d4
mov eax, dword [0x66bfb8]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x66bfd0], eax
push 0x51d7e8
mov eax, dword [0x66bfb8]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x66bfd4], eax
cmp dword [0x66bfc4], 0
je 0x51d5a9
cmp dword [0x66bfc8], 0
je 0x51d5a9
cmp dword [0x66bfcc], 0
je 0x51d5a9
cmp dword [0x66bfd0], 0
je 0x51d5a9
cmp dword [0x66bfd4], 0
jne 0x51d5c0
mov eax, dword [0x66bfb8]
push eax
call sub.kernel32.dll_FreeLibrary
xor eax, eax
mov dword [0x66bfb8], eax
jmp 0x51d748
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
cmp dword [eax + 0x24], 1
jne 0x51d748
mov ebx, eax
lea edx, [ebp - 0xc]
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.00654200
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 8]
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
mov edx, 0x51d800
call fcn.006547e4
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x10]
call fcn.00654200
mov eax, dword [ebp - 0x10]
push eax
call dword [0x66bfc4]
add esp, 8
mov edx, dword [esi]
mov dword [edx + 0x1c], eax
mov eax, dword [esi]
cmp dword [eax + 0x1c], 0
je 0x51d748
mov eax, dword [esi]
mov byte [eax + 0x15], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x18]
and eax, 0x3ff
cmp eax, 9
jne 0x51d653
mov eax, dword [esi]
mov eax, dword [eax + 0x460]
mov edx, 0x51d814
call fcn.0064eb60
mov eax, dword [esi]
mov eax, dword [eax + 0x460]
mov dl, 1
call fcn.0064f88c
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
mov ebx, dword [eax + 0x24]
dec ebx
cmp ebx, 0
jl 0x51d677
push 0
mov eax, dword [esi]
mov edx, dword [eax + 0x20]
mov ecx, ebx
mov eax, dword [esi]
call fcn.0051d918
dec ebx
cmp ebx, 0xffffffff
jne 0x51d661
mov eax, dword [esi]
mov eax, dword [eax + 0x24]
mov ebx, dword [eax + 0x24]
dec ebx
cmp ebx, 0
jl 0x51d69b
push 1
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
mov ecx, ebx
mov eax, dword [esi]
call fcn.0051d918
dec ebx
cmp ebx, 0xffffffff
jne 0x51d685
mov dl, 1
mov eax, dword [0x519368]
call fcn.00402898
mov ebx, eax
mov eax, dword [esi]
mov dword [eax + 0x2c], ebx
mov byte [ebx + 8], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x18]
call fcn.0064d718
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x2c]
mov dword [eax + 0x824], ebx
mov eax, dword [esi]
mov eax, dword [eax + 0x2c]
mov byte [ebx + 0x28], 1
mov edx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
call fcn.0064e1f0
mov dl, 1
mov eax, dword [0x519368]
call fcn.00402898
mov ebx, eax
mov eax, dword [esi]
mov dword [eax + 0x30], ebx
mov byte [ebx + 8], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x18]
call fcn.0064d718
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x30]
mov dword [eax + 0x824], ebx
mov eax, dword [esi]
mov eax, dword [eax + 0x30]
mov byte [ebx + 0x28], 1
mov edx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
call fcn.0064e1f0
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
mov eax, dword [0x6690d0]
mov eax, dword [eax]
call fcn.0046f41c
mov ebx, eax
push ebp
mov eax, dword [ebx + 0xc]
call fcn.0051d3ec
pop ecx
push ebp
mov eax, dword [ebx + 0x10]
call fcn.0051d3ec
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d772
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00403298
lea eax, [ebp - 8]
call fcn.00403880
ret