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

Disassembly:
sub esp, 0x60
push ebx
mov ebx, dword [esp + 0x68]
push ebp
push esi
mov eax, dword [ebx + 0x24]
mov esi, ecx
push edi
mov edi, dword [0x5e85d4]
mov ecx, dword [eax + 4]
mov ebp, 1
add ecx, edi
mov dword [esp + 0x74], ebp
mov dword [esi + 0x20], ecx
mov edx, dword [ebx + 0x24]
mov eax, dword [edx + 4]
mov edx, dword [0x5e85d0]
add eax, edx
mov dword [esi + 0x28], eax
mov ecx, dword [ebx + 0x24]
mov edx, dword [ecx + 8]
mov ecx, dword [0x5e85cc]
add edx, ecx
mov dword [esi + 0x24], edx
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax + 8]
mov eax, dword [0x5e85c8]
add ecx, eax
mov dword [esi + 0x2c], ecx
push ebp
mov ecx, esi
call fcn.00477e40
mov edi, eax
cmp dword [edi], 0
je 0x4782f5
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x78]
mov ecx, dword [edi + 8]
mov dword [esp + 0x1c], eax
add eax, edx
mov dword [esp + 0x20], ecx
mov dword [esi + 8], eax
mov eax, dword [esp + 0x7c]
add ecx, eax
mov dword [esi + 0xc], ecx
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x47818d
mov dword [esi + 0x10], 0x1000000
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 4]
cdq
sub eax, edx
sar eax, 1
add eax, ecx
mov ecx, dword [edi + 8]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x18]
cdq
sub eax, edx
mov ebp, eax
sar ebp, 1
add ebp, ecx
mov ecx, dword [edi + 0x1c]
push ecx
mov ecx, esi
call fcn.00477ed0
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x78]
add edx, ecx
mov dword [esi + 4], eax
mov dword [esi + 8], edx
mov edx, dword [esp + 0x7c]
add ebp, edx
mov dword [esi + 0xc], ebp
mov eax, dword [ebx + 0x24]
lea ebp, [esi + 4]
push eax
mov ecx, ebp
call fcn.00484440
call fcn.00479460
cmp dword [esp + 0x74], eax
jne 0x47808b
lea ecx, [edi + 0xd0]
mov dword [esi + 0x10], 0x25000000
call fcn.00477d10
mov dword [esi + 0x14], eax
mov ecx, dword [ebx + 0x24]
push ecx
mov ecx, ebp
call fcn.00484440
mov ecx, dword [esi + 8]
mov eax, dword [edi + 8]
mov edx, dword [esp + 0x7c]
add ecx, 0xfffffff4
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x18], eax
lea eax, [eax + edx - 0x1e]
push ecx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0x51000000
call fcn.00479490
add esp, 4
lea ecx, [edi + 0xf0]
mov dword [esi + 0x14], eax
call fcn.00477d10
push eax
mov ecx, esi
call fcn.00477eb0
mov dword [ebp], eax
lea edx, [esp + 0x24]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
mov ecx, ebp
call fcn.004844b0
mov eax, dword [esp + 0x10]
mov ecx, ebp
cdq
and edx, 3
add eax, edx
mov edx, dword [esi + 8]
sar eax, 2
neg eax
add edx, eax
mov dword [esi + 8], edx
mov eax, dword [ebx + 0x24]
push eax
call fcn.00484440
push 0x5e17
call fcn.004680f0
mov ecx, dword [esp + 0x78]
push eax
push ecx
call fcn.004794e0
mov edx, dword [esi + 0x2c]
mov ecx, dword [ebx + 0x24]
mov ebp, dword [esp + 0x24]
push eax
mov eax, dword [esi + 0x28]
push edx
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x20]
push edx
mov edx, dword [ecx + 8]
push eax
mov eax, dword [esp + 0x9c]
add edx, ebp
push 1
push 1
lea edx, [edx + eax - 0x17]
mov eax, dword [esp + 0x38]
push 1
push edx
mov ecx, dword [ecx + 4]
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0xa8]
sar eax, 2
sub ecx, eax
mov eax, dword [esp + 0x44]
add ecx, eax
lea eax, [ecx + edx + 6]
mov ecx, dword [ebx + 0x28]
push eax
push ecx
call fcn.004795d0
mov ebp, dword [esp + 0xac]
add esp, 0x38
jmp 0x4781e2
push ebp
mov dword [esi + 0x10], 0x51000000
call fcn.00479490
push str.ShapeMenuR61055_MapBoxSmall.SHP
mov dword [esi + 0x14], eax
call fcn.0054fe30
lea ecx, [esi + 4]
add esp, 8
mov dword [ecx], eax
mov edx, dword [ebx + 0x24]
push edx
call fcn.00484440
call fcn.00479460
cmp ebp, eax
jne 0x4781e2
lea ecx, [edi + 0xd0]
mov dword [esi + 0x10], 0x25000000
call fcn.00477d10
mov dword [esi + 0x14], eax
mov eax, dword [ebx + 0x24]
push eax
lea ecx, [esi + 4]
call fcn.00484440
mov eax, dword [edi + 0x1c]
test eax, eax
jne 0x478200
fld dword [0x577128]
fcomp dword [str.fff_]
fnstsw ax
test ah, 1
jne 0x4782f5
push ebp
call fcn.0046db50
add esp, 4
test eax, eax
je 0x4782f5
mov eax, dword [eax + 4]
push eax
call fcn.004680f0
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x4782f5
lea ecx, [esp + 0x30]
call fcn.004842c0
push ebp
call fcn.004178e0
mov ecx, eax
mov eax, 1
neg ecx
sbb ecx, ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
xor eax, eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 0x14]
mov ebp, dword [esp + 0x20]
mov edi, dword [edi + 0x18]
cdq
sub eax, edx
mov edx, dword [esp + 0x7c]
sar eax, 1
add eax, ebp
mov ebp, dword [esp + 0x24]
add eax, edx
mov edx, dword [esp + 0x80]
add edi, ebp
mov ebp, dword [ebx + 0x24]
add ecx, 2
add edi, edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x60], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], edi
mov dword [esp + 0x6c], edi
mov edx, dword [ebp + 4]
mov ebp, dword [ebp + 8]
push 1
add ebp, edi
mov edi, dword [esp + 0x20]
push 0
add edx, eax
push ecx
push edi
push edx
call fcn.0041b480
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esi + 0x2c]
push edx
mov edx, dword [esi + 0x28]
push ecx
mov ecx, dword [esi + 0x24]
push edx
mov edx, dword [esi + 0x20]
push ecx
mov ecx, dword [esp + 0x78]
push edx
mov edx, dword [ebx + 0x28]
push ecx
mov ecx, dword [esp + 0x70]
push edx
push edi
push ebp
push eax
mov eax, dword [esp + 0x84]
push eax
push ecx
call fcn.0041b8b0
mov ebp, dword [esp + 0xc0]
add esp, 0x4c
inc ebp
mov dword [esp + 0x74], ebp
lea edx, [ebp - 1]
cmp edx, 0x7d0
jl 0x477fc9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret 0xc