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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x1c]
fld dword [eax + 0x20]
mov ecx, 5
fstp dword [esp + 0x20]
push esi
fld dword [eax + 0x24]
xor eax, eax
cmp dword [ebp + 0xc], 3
fstp dword [esp + 0x28]
fld dword [0x4b1c60]
push edi
fstp dword [esp + 0x74]
mov dword [esp + 0x1c], ebx
fld dword [0x4b1b38]
mov dword [esp + 0x78], ecx
fstp dword [esp + 0x68]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], eax
jl 0x49c2f3
cmp dword [ebp + 8], eax
je 0x49c2f3
fld dword [ebp + 0x10]
fst dword [esp + 0x18]
fld dword [ebp + 0x14]
fst dword [esp + 0x14]
fld dword [ebx + 0x20]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x49bf54
fld dword [ebx + 0x20]
fstp dword [esp + 0x18]
fld dword [ebx + 0x24]
fcompp
fnstsw ax
test ah, 5
jp 0x49bf67
fld dword [ebx + 0x24]
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fsub dword [ebx]
fdiv dword [ebx + 4]
call fcn.0049f350
fld dword [esp + 0x14]
fsub dword [ebx]
lea esi, [eax + 1]
mov dword [esp + 0x30], esi
fdiv dword [ebx + 4]
call fcn.0049f350
mov edi, eax
sub edi, esi
inc edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], edi
test edi, edi
jle 0x49c378
mov ecx, dword [ebx + 0x18]
call fcn.00499be0
mov edx, dword [ebp + 8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], edx
test eax, eax
jle 0x49c0f8
mov dword [esp + 0x18], eax
jmp 0x49bfc7
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
add eax, eax
add eax, eax
fld dword [eax + edx]
add ecx, ecx
add ecx, ecx
fst qword [esp + 0x38]
fld dword [ecx + edx]
fst qword [esp + 0x48]
fld dword [edx + eax + 0xc]
fld dword [edx + ecx + 0xc]
fcom st(2)
fnstsw ax
test ah, 5
jp 0x49c008
fxch st(1)
fst qword [esp + 0x38]
fxch st(1)
fst qword [esp + 0x48]
fxch st(1)
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(2)
fst dword [esp + 0x24]
fld dword [esp + 0x24]
fsub dword [ebx]
fdiv dword [ebx + 4]
call fcn.0049f350
fxch st(2)
fst dword [esp + 0x24]
lea edi, [eax + 1]
fld dword [esp + 0x24]
fsub dword [ebx]
fdiv dword [ebx + 4]
call fcn.0049f350
cmp edi, eax
jg 0x49c0dd
cmp edi, esi
jge 0x49c041
mov edi, esi
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jle 0x49c04b
mov eax, ecx
cmp edi, eax
jg 0x49c0dd
fxch st(1)
mov edx, dword [esp + 0x14]
fsub st(3)
lea ebx, [edi + edi*2]
fxch st(1)
mov ecx, edi
fsub st(2)
add ebx, ebx
sub ecx, esi
add ebx, ebx
fdivp st(1)
lea ecx, [ecx + ecx*2]
sub eax, edi
lea esi, [edx + ecx*4 + 8]
lea edi, [eax + 1]
fstp qword [esp + 0x58]
jmp 0x49c088
fld qword [esp + 0x38]
fld qword [esp + 0x48]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x14]
fld dword [ebx + ecx + 8]
push 0
fstp dword [esp + 0x28]
push ecx
fsubr dword [esp + 0x2c]
fmul qword [esp + 0x60]
faddp st(1)
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp]
call fcn.00499910
mov ecx, dword [esi]
add esp, 8
test ecx, ecx
je 0x49c0c2
mov dword [ecx + 4], eax
jmp 0x49c0c5
mov dword [esi - 4], eax
inc dword [esi - 8]
mov dword [esi], eax
add ebx, 0xc
add esi, 0xc
dec edi
jne 0x49c080
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x30]
jmp 0x49c0e5
fstp st(2)
fstp st(1)
fstp st(1)
fstp st(0)
add dword [esp + 0x10], 0x18
dec dword [esp + 0x18]
jne 0x49bfc3
mov edi, dword [esp + 0x34]
test edi, edi
jle 0x49c378
mov edx, dword [esp + 0x14]
lea esi, [esi + esi*2]
add esi, esi
add esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], edi
mov eax, dword [esp + 0x10]
mov edi, dword [eax]
mov esi, dword [ebx + 0x18]
cmp edi, dword [esi + 0x68]
jle 0x49c16b
mov ecx, dword [esi + 0x6c]
push ecx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
mov dword [esi + 0x68], edi
neg ecx
or ecx, eax
push ecx
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
add esp, 8
mov dword [esi + 0x6c], eax
test eax, eax
jne 0x49c16b
push 0x424
push str.xy_grid.cxx
push str._tScanBuffer
call dword [sym.imp.MSVCR100.dll__wassert]
add esp, 0xc
mov esi, dword [esi + 0x6c]
mov ecx, dword [esp + 0x10]
push esi
mov dword [esp + 0x20], esi
call fcn.00497720
cmp eax, 1
jl 0x49c2d7
mov ecx, dword [ebx + 0x14]
add ecx, dword [esp + 0x18]
lea edx, [eax - 1]
mov dword [esp + 0x20], ecx
xor ecx, ecx
test edx, edx
jle 0x49c2d7
fld dword [esp + 0x28]
lea edi, [esi + 4]
fld dword [edi]
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x49c1be
add ecx, 2
add edi, 8
cmp ecx, edx
jl 0x49c1a4
jmp 0x49c2d5
cmp ecx, edx
jge 0x49c2d5
fld dword [esi + ecx*4]
fld dword [esp + 0x2c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x49c2d3
mov dword [esp + 0x14], ecx
add ecx, 2
cmp ecx, edx
jge 0x49c1fa
fld dword [esi + ecx*4]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x49c1fa
add ecx, 2
cmp ecx, edx
jl 0x49c1e7
mov eax, dword [esp + 0x14]
fld dword [esi + eax*4]
lea edi, [ecx - 2]
mov ecx, dword [esp + 0x14]
fcomp st(2)
fnstsw ax
test ah, 5
jp 0x49c218
fxch st(1)
fstp dword [esi + ecx*4]
jmp 0x49c21a
fstp st(1)
fld dword [esi + edi*4 + 4]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x49c22d
fstp dword [esi + edi*4 + 4]
jmp 0x49c22f
fstp st(0)
fld dword [0x4b1c60]
mov eax, 5
fstp dword [esp + 0x14]
mov esi, ecx
cmp ecx, edi
jg 0x49c2a6
xor ecx, ecx
mov dword [esp + 0x5c], 4
mov dword [esp + 0x60], ecx
mov dword [esp + 0x50], ecx
jmp 0x49c260
mov ecx, dword [esp + 0x1c]
fld dword [ecx + esi*4]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x58]
fstp dword [esp + 0x58]
fld dword [esp + 0x14]
mov dword [esp + 0x4c], eax
push edx
fstp dword [esp + 0x4c]
lea eax, [esp + 0x4c]
push eax
push ecx
call fcn.0049b630
mov eax, dword [esp + 0x28]
fld dword [eax + esi*4 + 4]
add esi, 2
add esp, 0xc
fstp dword [esp + 0x14]
mov eax, 4
cmp esi, edi
jle 0x49c260
mov ecx, dword [esp + 0x20]
fld dword [esp + 0x14]
lea edx, [esp + 0x68]
fstp dword [esp + 0x38]
mov dword [esp + 0x3c], eax
push edx
lea eax, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x4c], 0
call fcn.0049b630
add esp, 0xc
jmp 0x49c2d7
fstp st(0)
fstp st(0)
mov eax, 0xc
add dword [esp + 0x10], eax
add dword [esp + 0x18], eax
dec dword [esp + 0x24]
jne 0x49c117
jmp 0x49c378
fld dword [esp + 0x28]
mov ecx, 4
fstp dword [esp + 0x58]
mov dword [esp + 0x5c], ecx
fld dword [esp + 0x2c]
mov dword [esp + 0x60], eax
fstp dword [esp + 0x48]
mov dword [esp + 0x4c], ecx
fld dword [ebx + 0x24]
mov dword [esp + 0x50], eax
fsub dword [ebx]
fdiv dword [ebx + 4]
call fcn.0049f350
fld dword [ebx + 0x20]
fsub dword [ebx]
mov esi, eax
fdiv dword [ebx + 4]
call fcn.0049f350
inc eax
cmp eax, esi
jg 0x49c378
lea edi, [eax + eax*2]
add edi, edi
sub esi, eax
add edi, edi
inc esi
mov dword [esp + 0x2c], esi
mov esi, dword [ebx + 0x14]
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x78]
push eax
add esi, edi
push esi
call fcn.0049b630
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x58]
push edx
push esi
call fcn.0049b630
add esp, 0x18
add edi, 0xc
dec dword [esp + 0x2c]
jne 0x49c347
mov esi, dword [ebx + 0x14]
mov ebx, dword [ebx + 0x10]
lea eax, [ebx + ebx*2]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x49c3a7
cmp dword [esi], 0
jne 0x49c3a0
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x78]
push edx
push esi
call fcn.0049b630
add esp, 0xc
add esi, 0xc
cmp esi, edi
jne 0x49c388
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10