Function at 0x511490
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov esi, ecx
mov dword [ebp - 4], ebx
test edi, edi
je 0x5116ee
cmp dword [esi + 4], 0
je 0x5114ea
push ebx
call fcn.00512f90
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 - 4]
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.00512de0
mov dword [ebp - 8], eax
mov ecx, dword [eax + 0x1c]
test ecx, ecx
jne 0x51154b
push 0x5f0984
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 8]
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 - 4]
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.00512de0
mov dword [ebp - 4], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x5115a3
push 0x5f0af0
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.00512de0
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x5115f9
push 0x5f0af0
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 0x511668
mov edx, dword [ebp + 0x10]
sub edx, dword [edi + 0x1c]
sub edx, dword [edi + 0x14]
mov eax, dword [ebp + 8]
sub edx, eax
add eax, dword [edi + 0x14]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edx
mov dword [ebp - 4], eax
call fcn.00512de0
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x511656
push 0x5f0af0
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 edx, dword [edi + 0x20]
mov dword [ebp - 0x14], edx
test edx, edx
jle 0x5116c3
mov ecx, dword [edi + 0x14]
mov eax, dword [ebp + 0x10]
sub eax, dword [edi + 0x1c]
mov edi, dword [ebp + 0x14]
sub eax, ecx
mov dword [ebp - 4], eax
sub edi, edx
mov eax, dword [ebp + 8]
sub dword [ebp - 4], eax
add eax, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], eax
call fcn.00512de0
mov edi, eax
mov eax, dword [edi + 0x6c]
test eax, eax
jne 0x5116b1
push 0x5f0af0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [edi + 0x6c], eax
push dword [ebp - 0x14]
push dword [ebp - 4]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 8]
push ebx
call eax
call fcn.00512de0
mov edi, eax
mov eax, dword [edi + 0x44]
test eax, eax
jne 0x5116e1
push 0x5f0a48
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