Function at 0x4d7690
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
push edi
mov ebx, ecx
xor eax, eax
push ebp
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0xffffffff
call fcn.00566e70
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x4c]
add ebx, 0x48
cmp edx, ecx
mov dword [esp + 0x18], ebx
je 0x4d76f2
mov eax, ecx
sub eax, ecx
sar eax, 2
test eax, eax
lea esi, [eax*4]
lea edi, [esi + edx]
jle 0x4d76ef
push esi
push ecx
push esi
push edx
call fcn.005894ec
add esp, 0x10
mov dword [ebx + 8], edi
mov ebx, dword [esp + 0x40]
mov esi, ebx
and esi, 1
je 0x4d770b
push str._NO_AI
lea ecx, [esp + 0x20]
call fcn.00566ee0
test bl, 2
je 0x4d771e
push str._AI_ONLY
lea ecx, [esp + 0x20]
call fcn.00566ee0
test bl, 0x40
je 0x4d7731
push str._PaceCar
lea ecx, [esp + 0x20]
call fcn.00566ee0
test bl, 4
jne 0x4d773f
test esi, esi
mov byte [esp + 0x3c], 0
je 0x4d7744
mov byte [esp + 0x3c], 1
push ebp
mov ebp, dword [esp + 0x18]
mov ecx, ebp
call fcn.00566e70
lea ecx, [esp + 0x24]
call fcn.0056b630
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4d7764
xor ebx, ebx
jmp 0x4d776c
mov ebx, dword [ebp + 0x10]
sub ebx, eax
sar ebx, 2
xor edi, edi
test ebx, ebx
jle 0x4d784e
jmp 0x4d7780
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + edi*4]
cmp byte [esi + 0x3b8], 0
lea eax, [esi + 0x3b8]
lea ecx, [esi + 0x2b8]
je 0x4d779d
mov ecx, eax
mov edx, dword [esp + 0x1c]
test edx, edx
jne 0x4d77aa
mov edx, 0x5ad73f
call fcn.004d32a0
test al, al
je 0x4d7843
mov eax, dword [esp + 0x44]
test eax, eax
je 0x4d77d0
push eax
lea ecx, [esi + 0x78]
push ecx
call fcn.00588ead
add esp, 8
test eax, eax
jne 0x4d7843
cmp dword [esp + 0x48], 0
sete al
test al, al
jne 0x4d77f6
mov eax, dword [esi]
test eax, eax
jne 0x4d77e7
mov eax, 0x5ad73f
push eax
mov ecx, 0x921b3c
call fcn.004cf340
test eax, eax
je 0x4d7843
cmp byte [esp + 0x3c], 0
jne 0x4d780c
push esi
mov ecx, 0x921b3c
call fcn.004cf9e0
test al, al
je 0x4d7843
push 0x44
call fcn.00588cb9
add esp, 4
test eax, eax
je 0x4d7835
lea ecx, [esi + 0x1f8]
mov esi, eax
sub esi, ecx
mov dl, byte [ecx]
mov byte [esi + ecx], dl
add ecx, 1
test dl, dl
jne 0x4d7824
mov dword [eax + 0x40], edi
jmp 0x4d7837
xor eax, eax
push 1
push eax
lea ecx, [esp + 0x2c]
call fcn.00468c10
add edi, 1
cmp edi, ebx
jl 0x4d7780
push 1
lea ecx, [esp + 0x28]
call fcn.004d4f00
lea ecx, [esp + 0x24]
call fcn.004d3080
test eax, eax
je 0x4d78bf
mov edi, dword [esp + 0x18]
mov ecx, dword [edi + 4]
test ecx, ecx
lea esi, [eax + 0x40]
jne 0x4d7878
xor edx, edx
jmp 0x4d7880
mov edx, dword [edi + 8]
sub edx, ecx
sar edx, 2
test ecx, ecx
je 0x4d789f
mov eax, dword [edi + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x4d789f
mov eax, dword [edi + 8]
mov edx, dword [esi]
mov dword [eax], edx
add eax, 4
mov dword [edi + 8], eax
jmp 0x4d78ad
mov eax, dword [edi + 8]
push esi
push 1
push eax
mov ecx, edi
call fcn.0051ece0
add dword [esp + 0x10], 1
lea ecx, [esp + 0x24]
call fcn.004155b0
test eax, eax
jne 0x4d7866
lea ecx, [esp + 0x24]
call fcn.004b97f0
mov eax, dword [esp + 0x1c]
push eax
call fcn.0058881a
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x10