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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x58a8d1
push eax
mov dword fs:[0], esp
sub esp, 0x50
mov eax, 4
push ebx
push ebp
mov ebp, ecx
push esi
mov ecx, dword [0x5c989c]
push edi
cmp ecx, eax
jne 0x5023b4
mov al, 1
jmp 0x5032fd
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
mov word [ebp + 0x158], ax
mov eax, dword [esp + 0x70]
push 0x104
mov dword [ebp + 0x110], eax
lea eax, [ebp + 0x19c]
push edx
push eax
mov word [ebp + 0x15a], 5
mov dword [ebp + 0x15c], 0x42480000
mov dword [ebp + 0x114], ecx
call esi
mov ecx, dword [esp + 0x88]
lea eax, [ebp + 0x2a0]
push 0x104
push ecx
push eax
call esi
mov edx, dword [esp + 0x98]
lea eax, [ebp + 0x3a4]
push 0x104
push edx
push eax
call esi
mov ecx, dword [esp + 0xa8]
lea eax, [ebp + 0x4a8]
push 0x104
push ecx
push eax
call esi
xor ecx, ecx
xor edx, edx
mov cx, word [ebp + 0x158]
mov dx, word [ebp + 0x15a]
mov eax, ecx
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
imul eax, edx
lea ecx, [ecx + ecx*2]
shl eax, 1
lea ecx, [ecx*4 - 0xc]
dec edx
imul ecx, edx
lea edx, [eax*8]
mov dword [ebp + 0x16c], eax
sub edx, eax
mov dword [ebp + 0x170], ecx
shl edx, 2
push edx
call esi
add esp, 0x34
mov dword [ebp + 0x174], eax
test eax, eax
jne 0x5024ac
mov eax, dword [0x5e062c]
push str.A3DSky::Init_Not_enough_memory_
push eax
call fcn.004c6d70
add esp, 8
xor al, al
jmp 0x5032fd
mov ecx, dword [ebp + 0x170]
shl ecx, 1
push ecx
call esi
add esp, 4
mov dword [ebp + 0x178], eax
test eax, eax
jne 0x5024ce
push str.A3DSky::Init_Not_enough_memory_
jmp 0x5031fa
mov di, word [ebp + 0x15a]
mov cx, word [ebp + 0x158]
mov eax, edi
mov edx, ecx
and eax, 0xffff
and edx, 0xffff
dec eax
dec edx
mov dword [esp + 0x70], eax
xor ebx, ebx
fild dword [esp + 0x70]
mov dword [esp + 0x70], edx
mov dword [esp + 0x84], ebx
test cx, cx
fdivr dword [0x59480c]
mov esi, 0xffffff
fstp dword [esp + 0x7c]
fild dword [esp + 0x70]
fdivr dword [0x594808]
fstp dword [esp + 0x18]
jbe 0x502992
mov eax, ebx
and ecx, 0xffff
and eax, 0xffff
sub ecx, eax
mov dword [esp + 0x70], eax
dec ecx
mov dword [esp + 0x74], ecx
xor ecx, ecx
fild dword [esp + 0x74]
test di, di
mov dword [esp + 0x74], ecx
fmul dword [esp + 0x18]
fld st(0)
fcos
fmul dword [ebp + 0x15c]
fstp dword [esp + 0x78]
fsin
fmul dword [ebp + 0x15c]
fstp dword [esp + 0x10]
jbe 0x502718
fild dword [esp + 0x70]
neg bx
sbb ebx, ebx
fmul dword [0x58e1f0]
and ebx, 0xff
shl ebx, 0x18
or ebx, esi
mov esi, ecx
mov edx, edi
and esi, 0xffff
and edx, 0xffff
mov dword [esp + 0x80], esi
mov ecx, eax
fild dword [esp + 0x80]
imul ecx, edx
fld st(0)
fmul dword [esp + 0x7c]
fld st(0)
fsin
add ecx, esi
mov edi, dword [ebp + 0x174]
dec edx
fmul dword [esp + 0x78]
imul edx, eax
lea eax, [ecx*8]
add edx, esi
sub eax, ecx
shl eax, 2
fstp dword [edi + eax]
mov edi, dword [ebp + 0x174]
fld dword [esp + 0x10]
fstp dword [edi + eax + 4]
mov edi, dword [ebp + 0x174]
fcos
fmul dword [esp + 0x78]
fstp dword [edi + eax + 8]
mov edi, dword [ebp + 0x174]
mov dword [edi + eax + 0xc], ebx
mov edi, dword [ebp + 0x174]
mov dword [edi + eax + 0x10], 0xff000000
xor edi, edi
mov di, word [ebp + 0x15a]
dec edi
mov dword [esp + 0x80], edi
mov edi, dword [ebp + 0x174]
fild dword [esp + 0x80]
fdivr st(1)
fstp dword [edi + eax + 0x14]
xor edi, edi
mov di, word [ebp + 0x158]
dec edi
fstp st(0)
mov dword [esp + 0x80], edi
mov edi, dword [ebp + 0x174]
fild dword [esp + 0x80]
fdivr st(1)
fstp dword [edi + eax + 0x18]
xor eax, eax
mov ax, word [ebp + 0x15a]
dec eax
cmp esi, eax
je 0x5026ed
xor eax, eax
mov ax, word [ebp + 0x158]
mov esi, eax
mov eax, dword [esp + 0x70]
dec esi
cmp eax, esi
je 0x5026f1
mov esi, dword [ebp + 0x178]
lea edx, [edx + edx*2]
shl edx, 2
mov word [edx + esi], cx
mov edi, dword [ebp + 0x178]
lea esi, [ecx + 1]
mov word [edx + edi + 2], si
mov si, word [ebp + 0x15a]
mov edi, dword [ebp + 0x178]
add si, cx
mov word [edx + edi + 4], si
mov edi, dword [ebp + 0x178]
lea esi, [ecx + 1]
mov word [edx + edi + 6], si
mov si, word [ebp + 0x15a]
mov edi, dword [ebp + 0x178]
add si, cx
inc esi
mov word [edx + edi + 8], si
mov si, word [ebp + 0x15a]
add si, cx
mov ecx, dword [ebp + 0x178]
mov word [edx + ecx + 0xa], si
jmp 0x5026f1
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
mov di, word [ebp + 0x15a]
inc ecx
cmp cx, di
mov dword [esp + 0x74], ecx
jb 0x50258b
mov ebx, dword [esp + 0x84]
mov esi, 0xffffff
fstp st(0)
mov di, word [ebp + 0x15a]
xor edx, edx
test di, di
mov dword [esp + 0x74], edx
jbe 0x50297a
fild dword [esp + 0x70]
neg bx
sbb ebx, ebx
fmul dword [0x58e1f0]
and ebx, 0xff
shl ebx, 0x18
or ebx, esi
mov dword [esp + 0x14], ebx
xor ecx, ecx
and edi, 0xffff
mov cx, word [ebp + 0x158]
and edx, 0xffff
mov dword [esp + 0x80], edx
lea esi, [ecx + eax]
lea eax, [edi - 1]
mov ecx, esi
imul ecx, edi
lea edi, [edx + edi - 1]
add ecx, edx
mov dword [esp + 0x1c], edi
mov edi, dword [ebp + 0x174]
fild dword [esp + 0x1c]
dec esi
imul esi, eax
fmul dword [esp + 0x7c]
fsin
lea eax, [ecx*8]
add esi, edx
sub eax, ecx
shl eax, 2
fmul dword [esp + 0x78]
fstp dword [edi + eax]
mov edi, dword [ebp + 0x174]
fld dword [esp + 0x10]
fstp dword [edi + eax + 4]
xor edi, edi
mov di, word [ebp + 0x15a]
lea edi, [edi + edx - 1]
mov dword [esp + 0x1c], edi
mov edi, dword [ebp + 0x174]
fild dword [esp + 0x1c]
fmul dword [esp + 0x7c]
fcos
fmul dword [esp + 0x78]
fstp dword [edi + eax + 8]
mov edi, dword [ebp + 0x174]
fild dword [esp + 0x80]
mov dword [edi + eax + 0xc], ebx
mov edi, dword [ebp + 0x174]
mov dword [edi + eax + 0x10], 0xff000000
xor edi, edi
mov di, word [ebp + 0x15a]
dec edi
mov dword [esp + 0x80], edi
mov edi, dword [ebp + 0x174]
fidiv dword [esp + 0x80]
fstp dword [edi + eax + 0x14]
xor edi, edi
mov di, word [ebp + 0x158]
dec edi
mov dword [esp + 0x80], edi
mov edi, dword [ebp + 0x174]
fild dword [esp + 0x80]
fdivr st(1)
fsubr dword [0x58d5d4]
fstp dword [edi + eax + 0x18]
xor edi, edi
mov di, word [ebp + 0x15a]
lea ebx, [edi - 1]
cmp edx, ebx
jne 0x5028b9
mov ebx, dword [ebp + 0x174]
mov dword [esp + 0x80], ebx
mov ebx, dword [esp + 0x70]
imul ebx, edi
lea edi, [ebx*8]
sub edi, ebx
mov ebx, edi
mov edi, dword [esp + 0x80]
mov ebx, dword [edi + ebx*4]
mov dword [eax + edi], ebx
mov edi, dword [ebp + 0x174]
mov dword [esp + 0x80], edi
xor edi, edi
mov di, word [ebp + 0x15a]
imul edi, dword [esp + 0x70]
lea ebx, [edi*8]
sub ebx, edi
mov edi, dword [esp + 0x80]
fld dword [edi + ebx*4 + 8]
fchs
fstp dword [eax + edi + 8]
mov ebx, dword [esp + 0x14]
xor eax, eax
mov ax, word [ebp + 0x15a]
dec eax
cmp edx, eax
je 0x50294f
mov eax, dword [esp + 0x70]
xor edx, edx
mov dx, word [ebp + 0x158]
dec edx
cmp eax, edx
je 0x502953
mov edx, dword [ebp + 0x178]
lea esi, [esi + esi*2]
shl esi, 2
mov word [esi + edx], cx
mov edi, dword [ebp + 0x178]
lea edx, [ecx + 1]
mov word [esi + edi + 2], dx
mov dx, word [ebp + 0x15a]
mov edi, dword [ebp + 0x178]
add dx, cx
mov word [esi + edi + 4], dx
mov edi, dword [ebp + 0x178]
lea edx, [ecx + 1]
mov word [esi + edi + 6], dx
mov dx, word [ebp + 0x15a]
mov edi, dword [ebp + 0x178]
add dx, cx
inc edx
mov word [esi + edi + 8], dx
mov dx, word [ebp + 0x15a]
add dx, cx
mov ecx, dword [ebp + 0x178]
mov word [esi + ecx + 0xa], dx
jmp 0x502953
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov di, word [ebp + 0x15a]
inc edx
cmp dx, di
mov dword [esp + 0x74], edx
jb 0x50274c
mov ebx, dword [esp + 0x84]
mov esi, 0xffffff
fstp st(0)
mov cx, word [ebp + 0x158]
inc ebx
cmp bx, cx
mov dword [esp + 0x84], ebx
jb 0x502528
push 0x5c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x70], eax
xor edi, edi
cmp eax, edi
mov dword [esp + 0x68], edi
je 0x5029b3
mov ecx, eax
call fcn.004c7570
jmp 0x5029b5
xor eax, eax
cmp eax, edi
mov dword [esp + 0x68], 0xffffffff
mov dword [ebp + 0x160], eax
jne 0x5029d1
push str.A3DSky::Init_Not_enough_memory_
jmp 0x5031fa
mov ecx, dword [ebp + 0x170]
mov edx, dword [ebp + 0x16c]
push edi
push 1
push edi
push ecx
mov ecx, dword [ebp + 0x110]
push edx
push 1
push ecx
mov ecx, eax
call fcn.004c7690
test al, al
jne 0x502a01
push str.A3DSky::Init_Stream_Surround_Init_Fail_
jmp 0x5031fa
mov eax, dword [ebp + 0x16c]
mov ecx, dword [ebp + 0x174]
push eax
push ecx
mov ecx, dword [ebp + 0x160]
call fcn.004c7990
test al, al
jne 0x502a28
push str.A3DSky::Init_Stream_Surround_Set_Verts_Fail_
jmp 0x5031fa
mov eax, dword [ebp + 0x170]
mov ecx, dword [ebp + 0x178]
push eax
push ecx
mov ecx, dword [ebp + 0x160]
call fcn.004c7a80
test al, al
jne 0x502a4f
push str.A3DSky::Init_Stream_Surround_Set_Indices_Fail_
jmp 0x5031fa
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
push 0x230
mov dword [ebp + 0x17c], 0x14
mov dword [ebp + 0x180], 0x5a
call ebx
add esp, 4
cmp eax, edi
mov dword [ebp + 0x184], eax
jne 0x502a97
mov eax, dword [0x5e062c]
push str.A3DSky::Init_Not_enough_memory_
push eax
call fcn.004c6d70
add esp, 8
xor al, al
jmp 0x5032fd
mov ecx, dword [ebp + 0x180]
shl ecx, 1
push ecx
call ebx
add esp, 4
cmp eax, edi
mov dword [ebp + 0x188], eax
jne 0x502ab9
push str.A3DSky::Init_Not_enough_memory_
jmp 0x5031fa
fld dword [ebp + 0x15c]
fmul dword [0x58f20c]
xor ecx, ecx
xor edx, edx
xor eax, eax
fst dword [esp + 0x70]
mov ebx, edx
and ebx, 0x80000003
jns 0x502ade
dec ebx
or ebx, 0xfffffffc
inc ebx
mov dword [esp + 0x74], ebx
mov ebx, dword [ebp + 0x184]
fild dword [esp + 0x74]
add eax, 0x1c
fld st(0)
fsub dword [0x590dc0]
fmul dword [esp + 0x70]
fstp dword [ebx + eax - 0x1c]
mov ebx, dword [ebp + 0x184]
fld st(1)
fstp dword [ebx + eax - 0x18]
mov bx, cx
shr bx, 2
and ebx, 0xffff
inc ecx
mov dword [esp + 0x74], ebx
mov ebx, dword [ebp + 0x184]
fild dword [esp + 0x74]
inc edx
cmp cx, 0x10
fst dword [esp + 0x74]
fsub dword [0x590dc0]
fmul dword [esp + 0x70]
fstp dword [ebx + eax - 0x14]
mov ebx, dword [ebp + 0x184]
fmul dword [0x58e1f4]
mov dword [ebx + eax - 0x10], 0xffffffff
mov ebx, dword [ebp + 0x184]
mov dword [ebx + eax - 0xc], 0xff000000
mov ebx, dword [ebp + 0x184]
fstp dword [ebx + eax - 8]
fld dword [esp + 0x74]
fmul dword [0x58e1f4]
mov ebx, dword [ebp + 0x184]
fstp dword [ebx + eax - 4]
jb 0x502acf
mov eax, dword [ebp + 0x184]
mov dword [eax + 0xc], esi
mov ecx, dword [ebp + 0x184]
mov dword [ecx + 0x60], esi
mov edx, dword [ebp + 0x184]
mov dword [edx + 0x15c], esi
mov eax, dword [ebp + 0x184]
mov dword [eax + 0x1b0], esi
mov ecx, dword [ebp + 0x184]
mov dword [ecx + 0x1c0], edi
mov edx, dword [ebp + 0x184]
fst dword [edx + 0x1c4]
fld dword [esp + 0x70]
fmul dword [0x594428]
mov eax, dword [ebp + 0x184]
fst dword [eax + 0x1c8]
mov ecx, dword [ebp + 0x184]
mov eax, 0x3f99999a
fld dword [esp + 0x70]
mov dword [ecx + 0x1cc], esi
mov edx, dword [ebp + 0x184]
mov ecx, 0xff000000
mov dword [edx + 0x1d0], ecx
mov edx, dword [ebp + 0x184]
fadd st(0), st(0)
mov dword [edx + 0x1d4], eax
mov edx, dword [ebp + 0x184]
mov dword [edx + 0x1d8], 0xbecccccd
mov edx, dword [ebp + 0x184]
fst dword [edx + 0x1dc]
mov edx, dword [ebp + 0x184]
fld st(2)
fstp dword [edx + 0x1e0]
mov edx, dword [ebp + 0x184]
fld st(2)
mov dword [edx + 0x1e4], edi
mov edx, dword [ebp + 0x184]
mov dword [edx + 0x1e8], esi
mov edx, dword [ebp + 0x184]
mov dword [edx + 0x1ec], ecx
mov ebx, dword [ebp + 0x184]
mov edx, 0x40333333
mov dword [ebx + 0x1f0], edx
mov ebx, dword [ebp + 0x184]
mov dword [ebx + 0x1f4], eax
mov ebx, dword [ebp + 0x184]
mov dword [ebx + 0x1f8], edi
mov ebx, dword [ebp + 0x184]
fstp dword [ebx + 0x1fc]
mov ebx, dword [ebp + 0x184]
fstp dword [ebx + 0x200]
mov ebx, dword [ebp + 0x184]
mov dword [ebx + 0x204], esi
mov ebx, dword [ebp + 0x184]
mov dword [ebx + 0x208], ecx
mov ebx, dword [ebp + 0x184]
mov dword [ebx + 0x20c], eax
mov ebx, dword [ebp + 0x184]
mov dword [ebx + 0x210], edx
mov edx, dword [ebp + 0x184]
fstp dword [edx + 0x214]
mov edx, dword [ebp + 0x184]
fst dword [edx + 0x218]
mov edx, dword [ebp + 0x184]
fld st(0)
mov dword [edx + 0x21c], edi
mov edx, dword [ebp + 0x184]
fmul dword [0x594804]
mov dword [edx + 0x220], esi
mov edx, dword [ebp + 0x184]
mov dword [edx + 0x224], ecx
mov ecx, dword [ebp + 0x184]
mov dword [ecx + 0x228], 0xbecccccd
mov edx, dword [ebp + 0x184]
mov dword [edx + 0x22c], eax
mov eax, dword [ebp + 0x184]
fld dword [eax + 4]
fsub st(1)
fstp dword [eax + 4]
mov eax, dword [ebp + 0x184]
fld st(1)
fmul dword [0x594800]
fld dword [eax + 0x20]
mov esi, 1
fsub st(1)
fstp dword [eax + 0x20]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x3c]
fsub st(1)
fstp dword [eax + 0x3c]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x58]
fsub st(2)
fstp dword [eax + 0x58]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x74]
fsub st(1)
fstp dword [eax + 0x74]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0xc8]
fsub st(1)
fstp dword [eax + 0xc8]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0xe4]
fsub st(1)
fstp dword [eax + 0xe4]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x138]
fsub st(1)
fstp dword [eax + 0x138]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x154]
fsub st(2)
fstp dword [eax + 0x154]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x170]
fsub st(1)
fstp dword [eax + 0x170]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x18c]
fsub st(1)
fstp dword [eax + 0x18c]
mov eax, dword [ebp + 0x184]
fstp st(0)
fld dword [eax + 0x1a8]
fsub st(1)
fstp dword [eax + 0x1a8]
mov eax, dword [ebp + 0x184]
fstp st(0)
fmul dword [0x5947fc]
fld dword [eax + 0x1c4]
fsub st(1)
fstp dword [eax + 0x1c4]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x1e0]
fsub st(1)
fstp dword [eax + 0x1e0]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x1fc]
fsub st(1)
fstp dword [eax + 0x1fc]
mov eax, dword [ebp + 0x184]
fld dword [eax + 0x218]
fsub st(1)
fstp dword [eax + 0x218]
xor eax, eax
fstp st(0)
mov ecx, esi
mov dword [esp + 0x70], 3
mov edi, dword [ebp + 0x188]
lea edx, [ecx - 1]
mov word [eax + edi], dx
mov edx, dword [ebp + 0x188]
mov word [eax + edx + 2], cx
mov edi, dword [ebp + 0x188]
lea edx, [ecx + 3]
mov word [eax + edi + 4], dx
mov edi, dword [ebp + 0x188]
mov word [eax + edi + 6], cx
mov ebx, dword [ebp + 0x188]
lea edi, [ecx + 4]
inc ecx
mov word [eax + ebx + 8], di
mov edi, dword [ebp + 0x188]
mov word [eax + edi + 0xa], dx
mov edx, dword [esp + 0x70]
add eax, 0xc
dec edx
mov dword [esp + 0x70], edx
jne 0x502e78
add esi, 4
cmp si, 0xd
jb 0x502e6e
mov eax, 0x6c
mov ecx, 0x5d1430
sub ecx, eax
mov edx, 0x24
mov esi, dword [ebp + 0x188]
mov di, word [ecx + eax]
mov word [eax + esi], di
add eax, 2
dec edx
jne 0x502eeb
push 0x5c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x70], eax
test eax, eax
mov dword [esp + 0x68], 1
je 0x502f22
mov ecx, eax
call fcn.004c7570
jmp 0x502f24
xor eax, eax
or edi, 0xffffffff
mov dword [ebp + 0x164], eax
test eax, eax
mov dword [esp + 0x68], edi
jne 0x502f4f
mov eax, dword [0x5e062c]
push str.A3DSky::Init_Not_enough_memory_
push eax
call fcn.004c6d70
add esp, 8
xor al, al
jmp 0x5032fd
mov ecx, dword [ebp + 0x180]
mov edx, dword [ebp + 0x17c]
push 1
push 1
push 0
push ecx
mov ecx, dword [ebp + 0x110]
push edx
push 1
push ecx
mov ecx, eax
call fcn.004c7690
test al, al
jne 0x502f81
push str.A3DSky::Init_Stream_Flat_Init_Fail_
jmp 0x5031fa
mov eax, dword [ebp + 0x17c]
mov ecx, dword [ebp + 0x184]
push eax
push ecx
mov ecx, dword [ebp + 0x164]
call fcn.004c7990
test al, al
jne 0x502fa8
push str.A3DSky::Init_Stream_Flat_Set_Verts_Fail_
jmp 0x5031fa
mov eax, dword [ebp + 0x180]
mov ecx, dword [ebp + 0x188]
push eax
push ecx
mov ecx, dword [ebp + 0x164]
call fcn.004c7a80
test al, al
je 0x5031f5
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
push 0x70
mov dword [ebp + 0x18c], 4
mov dword [ebp + 0x190], 6
call esi
add esp, 4
mov dword [ebp + 0x194], eax
test eax, eax
jne 0x50300e
mov eax, dword [0x5e062c]
push str.A3DSky::Init_Not_enough_memory_
push eax
call fcn.004c6d70
add esp, 8
xor al, al
jmp 0x5032fd
mov ecx, dword [ebp + 0x190]
shl ecx, 1
push ecx
call esi
add esp, 4
mov dword [ebp + 0x198], eax
test eax, eax
jne 0x503030
push str.A3DSky::Init_Not_enough_memory_
jmp 0x5031fa
xor ecx, ecx
xor edx, edx
xor eax, eax
mov esi, 0xff000000
mov ebx, edx
and ebx, 0x80000001
jns 0x50304a
dec ebx
or ebx, 0xfffffffe
inc ebx
mov dword [esp + 0x70], ebx
mov ebx, dword [ebp + 0x194]
fild dword [esp + 0x70]
add eax, 0x1c
fld st(0)
fsub dword [0x58e1f0]
fmul dword [ebp + 0x15c]
fmul dword [0x590dc0]
fstp dword [ebx + eax - 0x1c]
fld dword [ebp + 0x15c]
fmul dword [0x5947f8]
mov ebx, dword [ebp + 0x194]
fstp dword [ebx + eax - 0x18]
mov bx, cx
shr bx, 1
and ebx, 0xffff
inc ecx
mov dword [esp + 0x70], ebx
mov ebx, dword [ebp + 0x194]
fild dword [esp + 0x70]
inc edx
cmp cx, 4
fst dword [esp + 0x70]
fsub dword [0x58e1f0]
fmul dword [ebp + 0x15c]
fmul dword [0x590dc0]
fstp dword [ebx + eax - 0x14]
mov ebx, dword [ebp + 0x194]
mov dword [ebx + eax - 0x10], edi
mov ebx, dword [ebp + 0x194]
mov dword [ebx + eax - 0xc], esi
mov ebx, dword [ebp + 0x194]
fstp dword [ebx + eax - 8]
mov ebx, dword [ebp + 0x194]
fld dword [esp + 0x70]
fstp dword [ebx + eax - 4]
jb 0x50303b
mov eax, dword [ebp + 0x198]
mov ebx, 1
mov esi, 2
push 0x5c
mov word [eax], 0
mov ecx, dword [ebp + 0x198]
mov word [ecx + 2], bx
mov edx, dword [ebp + 0x198]
mov word [edx + 4], si
mov eax, dword [ebp + 0x198]
mov word [eax + 6], si
mov ecx, dword [ebp + 0x198]
mov word [ecx + 8], bx
mov edx, dword [ebp + 0x198]
mov word [edx + 0xa], 3
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x70], eax
test eax, eax
mov dword [esp + 0x68], esi
je 0x50315d
mov ecx, eax
call fcn.004c7570
jmp 0x50315f
xor eax, eax
test eax, eax
mov dword [esp + 0x68], edi
mov dword [ebp + 0x168], eax
jne 0x503187
mov eax, dword [0x5e062c]
push str.A3DSky::Init_Not_enough_memory_
push eax
call fcn.004c6d70
add esp, 8
xor al, al
jmp 0x5032fd
mov ecx, dword [ebp + 0x190]
mov edx, dword [ebp + 0x18c]
push 0
push ebx
push 0
push ecx
mov ecx, dword [ebp + 0x110]
push edx
push ebx
push ecx
mov ecx, eax
call fcn.004c7690
test al, al
jne 0x5031b4
push str.A3DSky::Init_Stream_Cap_Init_Fail_
jmp 0x5031fa
mov eax, dword [ebp + 0x18c]
mov ecx, dword [ebp + 0x194]
push eax
push ecx
mov ecx, dword [ebp + 0x168]
call fcn.004c7990
test al, al
jne 0x5031d8
push str.A3DSky::Init_Stream_Cap_Set_Verts_Fail_
jmp 0x5031fa
mov eax, dword [ebp + 0x190]
mov ecx, dword [ebp + 0x198]
push eax
push ecx
mov ecx, dword [ebp + 0x168]
call fcn.004c7a80
test al, al
jne 0x503210
push str.A3DSky::Init_Stream_Flat_Set_Indices_Fail_
mov edx, dword [0x5e062c]
push edx
call fcn.004c6d70
add esp, 8
xor al, al
jmp 0x5032fd
mov eax, dword [ebp + 0x110]
push ebx
lea edx, [ebp + 0x5b8]
push 4
mov ecx, dword [eax + 0x764]
push edx
lea eax, [ebp + 0x19c]
push str.TexturesSky
mov ecx, dword [ecx + 0x6c]
push eax
call fcn.004c3670
test al, al
je 0x5032fd
mov eax, dword [ebp + 0x110]
push ebx
lea edx, [ebp + 0x5ac]
push 4
mov ecx, dword [eax + 0x764]
push edx
lea eax, [ebp + 0x2a0]
push str.TexturesSky
mov ecx, dword [ecx + 0x6c]
push eax
call fcn.004c3670
test al, al
je 0x5032fd
mov eax, dword [ebp + 0x110]
push ebx
lea edx, [ebp + 0x5b0]
push 4
mov ecx, dword [eax + 0x764]
push edx
lea eax, [ebp + 0x3a4]
push str.TexturesSky
mov ecx, dword [ecx + 0x6c]
push eax
call fcn.004c3670
test al, al
je 0x5032fd
mov eax, dword [ebp + 0x110]
push ebx
lea edx, [ebp + 0x5b4]
push 4
mov ecx, dword [eax + 0x764]
push edx
lea eax, [ebp + 0x4a8]
push str.TexturesSky
mov ecx, dword [ecx + 0x6c]
push eax
call fcn.004c3670
test al, al
je 0x5032fd
lea eax, [esp + 0x20]
push eax
call fcn.004aab90
mov ecx, 0x10
mov esi, eax
lea edi, [esp + 0x24]
add esp, 4
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x118]
mov ecx, 0x10
lea esi, [esp + 0x20]
mov al, bl
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret 0x18