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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
push ebx
push ebp
push esi
xor ebp, ebp
or eax, 0xffffffff
mov esi, ecx
cmp dword [esi + 0x20870], ebp
push edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
jle 0x4d86a9
mov eax, dword [esi + 0x20304]
mov bl, byte [eax + 0x18]
mov eax, dword [esi + 0x20874]
mov edx, dword [0x912e94]
and bl, 1
neg bl
lea ecx, [eax + eax*2]
lea edi, [eax + ecx*8]
mov ecx, dword [edx + 0x164]
mov eax, dword [ecx]
sbb ebx, ebx
and ebx, 5
add edi, edi
add ebx, 0xf
add edi, edi
call dword [eax + 4]
add edi, 1
xor edx, edx
mov ecx, dword [esi + 0x20870]
div edi
imul ecx, ebx
cmp edx, ecx
jge 0x4d86a9
mov ecx, dword [esi + 0x118]
lea edx, [esp + 0x28]
push edx
call fcn.00701230
mov eax, dword [esi + 0x20304]
mov ecx, dword [eax + 0x5c]
push ebp
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.005444c0
mov eax, dword [esp + 0x34]
mov edi, dword [esi + 0x20304]
mov ecx, dword [edi + 0x5c]
cdq
idiv ecx
add esp, 0xc
mov ebx, eax
mov eax, dword [esp + 0x2c]
cdq
idiv ecx
mov dword [esp + 0x28], ebx
mov ebp, eax
mov eax, dword [esp + 0x30]
cdq
idiv ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
cdq
idiv ecx
mov dword [esp + 0x34], eax
mov ecx, dword [edi + 0x78]
cmp ebx, ecx
jge 0x4d847b
mov dword [esp + 0x28], ecx
mov ecx, dword [edi + 0x7c]
cmp ebp, ecx
jge 0x4d8486
mov dword [esp + 0x2c], ecx
mov ecx, dword [edi + 0x80]
cmp dword [esp + 0x30], ecx
jle 0x4d8496
mov dword [esp + 0x30], ecx
mov edi, dword [edi + 0x84]
cmp eax, edi
jle 0x4d84a4
mov dword [esp + 0x34], edi
mov eax, dword [0x912e94]
mov ecx, dword [eax + 0x164]
mov edi, dword [esi + 0x20870]
mov edx, dword [ecx]
sub edi, 1
call dword [edx + 4]
add edi, 1
xor edx, edx
div edi
mov eax, dword [esi + 0x20304]
mov cl, byte [eax + 0x18]
mov ebx, dword [esp + 0x2c]
and ecx, 1
cmp ebx, dword [esp + 0x34]
mov dword [esp + 0x14], ecx
mov ebp, edx
jg 0x4d86a9
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
lea esp, [esp]
cmp edi, eax
jg 0x4d8567
sub esp, 8
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], ebx
mov ecx, dword [esi + 0x20304]
mov edx, dword [ecx]
mov dword [esp + 0x20], esp
call dword [edx + 0xe0]
movzx eax, al
cmp eax, 0x57
jne 0x4d8558
cmp dword [esp + 0x14], 0
je 0x4d854f
mov eax, dword [esi + 0x20304]
mov eax, dword [eax + 0x5c]
mov ecx, eax
imul eax, edi
imul ecx, ebx
push 1
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x20]
push 1
push ecx
mov dword [esp + 0x28], eax
call fcn.0065f120
add esp, 0xc
cmp ax, 0xf000
jne 0x4d8558
mov edx, ebp
sub ebp, 1
test edx, edx
je 0x4d8578
mov eax, dword [esp + 0x30]
add edi, 1
cmp edi, eax
jle 0x4d84f4
mov edi, dword [esp + 0x28]
add ebx, 1
cmp ebx, dword [esp + 0x34]
jle 0x4d84f0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 4
sub esp, 8
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], ebx
mov ecx, dword [esi + 0x20304]
mov eax, dword [ecx]
mov dword [esp + 0x24], esp
call dword [eax + 0xec]
cmp eax, 4
jl 0x4d86a9
mov ecx, dword [esi + 0x20304]
test byte [ecx + 0x18], 1
je 0x4d85c8
mov edx, dword [0x912e94]
mov ecx, dword [edx + 0x164]
mov eax, dword [ecx]
call dword [eax + 4]
and eax, 1
mov ebp, dword [eax*4 + 0x85f80c]
jmp 0x4d85e9
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x164]
mov edx, dword [ecx]
call dword [edx + 4]
xor edx, edx
mov ecx, 3
div ecx
mov ebp, dword [edx*4 + 0x85f800]
mov edx, dword [esi + 0x20304]
mov eax, dword [edx + 0x5c]
mov ecx, eax
imul ecx, edi
mov edi, eax
imul edi, ebx
push 0xff
cdq
push 0xffffffffffffffff
sub eax, edx
push 1
sar eax, 1
lea ebx, [ecx + eax]
mov ecx, dword [esi + 0x20304]
push 0
add edi, eax
push ebp
lea eax, [esp + 0x30]
push eax
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], 0
call fcn.005e7050
add esp, 0x1c
cmp ebp, dword [str.images_water_dolphin.img]
jne 0x4d86a9
push 8
call fcn.0040fa60
add esp, 4
test eax, eax
je 0x4d8655
mov dword [eax], ebx
mov dword [eax + 4], edi
mov ebx, eax
jmp 0x4d8657
xor ebx, ebx
mov edx, dword [0x912e94]
mov ecx, dword [edx + 0x164]
mov eax, dword [ecx]
call dword [eax + 4]
xor edx, edx
mov ecx, 0x28b
div ecx
mov edi, edx
mov edx, dword [0x912e94]
mov ecx, dword [edx + 0x164]
mov eax, dword [ecx]
add edi, 0x32
call dword [eax + 4]
xor edx, edx
mov ecx, 5
div ecx
mov eax, dword [esi]
push edi
push ebx
lea ecx, [esi + 8]
add edx, 1
push edx
push 0x4616
push ecx
mov ecx, esi
call dword [eax + 0xf0]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret