Function at 0x511490
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov esi, ecx
mov dword [ebp - 8], ebx
test edi, edi
je 0x511707
cmp dword [esi + 4], 0
je 0x5114ea
push ebx
call fcn.00513050
test eax, eax
je 0x5114ea
mov eax, dword [ebp + 8]
mov ecx, esi
push edi
push ebx
sub esp, 0x10
mov edx, esp
mov dword [edx], eax
mov eax, dword [ebp + 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [edx + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [edx + 0xc], eax
call fcn.005113a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x54]
mov ebx, eax
test ebx, ebx
jne 0x511527
mov eax, dword [ebp + 8]
push edi
push dword [ebp - 8]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [ecx + 0xc], eax
mov ecx, esi
call fcn.005113a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
call fcn.00512e20
mov dword [ebp - 4], eax
mov ecx, dword [eax + 0x1c]
test ecx, ecx
jne 0x51154b
push 0x5ca19c
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x1c], eax
mov ecx, eax
push 1
push ebx
call ecx
lea eax, [ebp + 8]
mov ecx, esi
push eax
push dword [ebp - 8]
call fcn.00510700
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x5115b5
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], eax
call fcn.00512e20
mov dword [ebp - 4], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x5115a3
push 0x5ca308
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x6c], eax
mov ecx, eax
push dword [ebp - 0x18]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 8]
push ebx
call ecx
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x51160b
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
sub ecx, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0x10]
sub ecx, eax
mov dword [ebp - 0x18], edx
mov dword [ebp - 4], ecx
call fcn.00512e20
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x5115f9
push 0x5ca308
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x6c], eax
mov ecx, eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp - 4]
push dword [ebp - 8]
push ebx
call ecx
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x511674
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
sub ecx, eax
mov edx, dword [edi + 0x1c]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + 0x14]
add eax, ecx
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], eax
call fcn.00512e20
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x51165b
push 0x5ca308
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x6c], eax
mov ecx, eax
push dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x18]
sub eax, dword [ebp - 4]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 8]
push ebx
call ecx
mov edx, dword [edi + 0x20]
mov dword [ebp - 0x20], edx
test edx, edx
jle 0x5116dc
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
sub ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edi + 0x14]
mov dword [ebp - 4], ecx
mov ecx, dword [edi + 0x1c]
add eax, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x14]
sub ecx, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ecx
call fcn.00512e20
mov edi, eax
mov ecx, dword [edi + 0x6c]
test ecx, ecx
jne 0x5116c3
push 0x5ca308
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [edi + 0x6c], eax
mov ecx, eax
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x14]
sub eax, dword [ebp - 4]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 8]
push ebx
call ecx
call fcn.00512e20
mov edi, eax
mov eax, dword [edi + 0x44]
test eax, eax
jne 0x5116fa
push 0x5ca260
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [edi + 0x44], eax
push dword [ebp - 8]
call eax
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x58]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18