Function at 0x504230
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 0x50448e
cmp dword [esi + 4], 0
je 0x50428a
push ebx
call fcn.00505d30
test eax, eax
je 0x50428a
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.00504140
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 0x5042c7
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.00504140
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
call fcn.00505b80
mov dword [ebp - 8], eax
mov ecx, dword [eax + 0x1c]
test ecx, ecx
jne 0x5042eb
push 0x5e1ff4
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.005034a0
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x504355
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.00505b80
mov dword [ebp - 4], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x504343
push 0x5e2160
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 0x5043ab
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.00505b80
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x504399
push 0x5e2160
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 0x504408
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.00505b80
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x5043f6
push 0x5e2160
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 0x504463
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.00505b80
mov edi, eax
mov eax, dword [edi + 0x6c]
test eax, eax
jne 0x504451
push 0x5e2160
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.00505b80
mov edi, eax
mov eax, dword [edi + 0x44]
test eax, eax
jne 0x504481
push 0x5e20b8
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